عندما نقوم بعمل مشاريع BBS ، نحتاج إلى استخدام محرر UBB. يستخدم مديرو الواجهة الخلفية عمومًا محرر CKEditor ، ويستخدم مستخدمو الإنترنت عمومًا محرر UBB. كثير من الناس لا يعرفون الكثير عن محرر UBB. ما يلي هو الخطأ المحرر الجديد. يحلل المحرر لفترة وجيزة محرر UBB لك.
<! doctype html public "-// w3c // dtd html 4.01 Transitional // en" '' '' target = _blank rel = nofollow> http://www.w3.org/tr/html4/loose.dtd ">
<html>
<head>
<title> محرر UBB </title>
<meta http-equiv = "content-type" content = "text/html ؛ charset = gb2312">
<link href = "style.css" rel = "STYLESHEET" type = "text/css">
<script language = "javaScript">
<!-
if (navigator.appname == "Microsoft Internet Explorer")
{
isie = صحيح ؛
}
آخر
{
isie = false ؛
}
وظيفة AddText (NewCode)
{
if (document.all) {
insertatcaret (document.ubbform.content ، newCode) ؛
document.ubbform.content.focus () ؛
}
آخر
{
document.ubbform.content.value += newCode ؛
document.ubbform.content.focus () ؛
}
}
دالة insertatcaret (textel ، text) {
if (textel.createtextrange && textel.caretpos)
{
var caretpos = textel.caretpos ؛
caretpos.text += caretpos.text.charat (caretpos.text.length - 2) == ''؟ النص + '': نص ؛
}
آخر إذا (textel)
{
textel.value += text ؛
}
آخر
{
textel.value = text ؛
}
}
وظيفة Ubbformat (ماذا)
{
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createRange () ؛
Range.text = "["+What+"]"+Range.text+"[/"+What+"]" ؛
}
آخر
{
txt = window.prompt ("الرجاء إدخال المحتوى" ، "") ؛
if (txt! = null) {
addTxt = "["+What+"]"+txt ؛
addText (addTxt) ؛
addText ("[/"+What+"]") ؛
}
}
}
وظيفة ubbinsert (ماذا)
{
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createRange () ؛
Range.text = "["+What+"]"+Range.text+"[/"+What+"]" ؛
}
آخر
{
txt = window.prompt ("الرجاء إدخال المحتوى" ، "") ؛
if (txt! = null) {
addTxt = "["+What+"]"+txt ؛
addText (addTxt) ؛
addText ("[/"+what+"]") ؛
}
}
}
وظيفة chsize (الحجم) {
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createRange () ؛
Range.text = "[size =" + size + "]" + range.text + "[/size]" ؛
}
آخر
{
txt = window.prompt ("الرجاء إدخال المحتوى" ، "") ؛
إذا (txt! = خالية)
{
addTxt = "[size ="+size+"]"+txt ؛
addText (addTxt) ؛
addText ("[/size]") ؛
}
}
}
وظيفة chfont (الخط) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.createRange () ؛
Range.Text = "" + Range.text + "" ؛
}
آخر
{
txt = window.prompt ("الرجاء إدخال المحتوى" ، "") ؛
إذا (txt! = خالية)
{
addtxt = ""+txt ؛
addText (addTxt) ؛
addtext ("") ؛
}
}
}
وظيفة chcolor (اللون) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.createRange () ؛
Range.Text = "" + Range.text + "" ؛
}
آخر
{
txt = window.prompt ("الرجاء إدخال المحتوى" ، "") ؛
if (txt! = null) {
addtxt = ""+txt ؛
addText (addTxt) ؛
addtext ("") ؛
}
}
}
//->
</script>
</head>
<body>
<method method = post name = "ubbform" Action = "">
<table align = "center" border = "0">
<tr>
<td>
<select name = "font" onfocus = "this.selectedIndex = 0" onChange = "chfont (this.options [this.selectedIndex] .value)" size = "1">
<Option Value = "" "محدد> حدد الخط </option>
<value Option = "宋体"> 宋体 </soph>
<Option Value = "Bold"> Bold </soph>
<value Option = "arial"> arial </soph>
<Option Value = "Book Antiqua"> Book Antiqua </port
<خيار Value = "Century Gothic"> Century Gothic </Option>
<Option Value = "Courier New"> Courier New </Option>
<value Option = "Georgia"> Georgia </soph>
<value Option = "Impact"> Impact </Option>
<value Option = "tahoma"> tahoma </soph>
<Option Value = "Times New Roman"> Times New Roman </Option>
<Option Value = "Verdana"> Verdana </soph>
</select>
<select name = "size" onfocus = "this.selectedIndex = 0" onChange = "chsize (this.options [this.selectedIndex] .value)" size = "1">
<Option Value = "" SELECT> حجم الخط </option>
<value Option = "-2">-2 </soph>
<value Option = "-1">-1 </soph>
<value Option = "1"> 1 </soph>
<Option Value = "2"> 2 </soph>
<Option Value = "3"> 3 </soph>
<Option Value = "4"> 4 </Option>
<Option Value = "5"> 5 </soph>
<Option Value = "6"> 6 </soph>
<Option Value = "7"> 7 </soph>
</select>
<select name = "color" onfocus = "this.selectedIndex = 0" onChange = "chcolor (this.options [this.selectedIndex] .value)" size = "1">
<Option Value = "" SELECT> FONT COLE </OPTION>
<Option Value = "Black" style = "Background-Color: Black ؛ Color: Black ؛"> Black </Option>
<Option Value = "White" style = "Background-Color: White ؛ Color: White ؛"> White </Option>
<Option Value = "Red" style = "Background-Color: Red ؛ Color: Red ؛"> Red </Option>
<value Option = "yellow" style = "background-color: الأصفر ؛ اللون: أصفر ؛"> أصفر </option>
<Option Value = "Pink" style = "Background-Color: Pink ؛ Color: Pink ؛"> Pink </Option>
<Option Value = "Green" style = "Background-Color: Green ؛ Color: Green ؛"> Green </Option>
<Option Value = "Orange" style = "Background-Color: Orange ؛ Color: Orange ؛"> Orange </Option>
<value Option = "purple" style = "الخلفية اللون: اللون الأرجواني ؛ اللون: اللون الأرجواني ؛"> الأرجواني </option>
<Option Value = "Blue" style = "Background-Color: Blue ؛ Color: Blue ؛"> Blue </Option>
<Option Value = "beige" style = "background-color: beige ؛ color: beige ؛"> beige </soph>
<Option Value = "Brown" style = "Background-Color: Brown ؛ Color: Brown ؛"> Brown </soph>
<Option Value = "teal" style = "background-color: teal ؛ color: teal ؛"> teal </soph>
<Option Value = "Navy" style = "Background-Color: Navy ؛ Color: Navy ؛"> Navy </soph>
<Option Value = "Maroon" style = "Background-Color: Maroon ؛ Color: Maroon ؛"> Maroon </Option>
<Option Value = "limegreen" style = "background-color: limegreen ؛ color: limegreen ؛"> limegreen </tepress>
</select>
</td>
</r>
<tr>
<td>
<img src = "ubb/bold.gif" border = "0" alt = "bold" onClick = "ubbformat ('b')"> <img src = "ubb/italicize.gif" border = "0" alt = "Italic" onClick = "ubbformat ('i') alt = "enderline" onClick = "ubbformat ('u')"> <img src = "ubb/center.gif" border = "0" alt = "center alignment" onClick = "ubbformat ('center')> <img src =" ubb/email. onClick = "ubbformat ('email')"> <img src = "ubb/url.gif" border = "0" alt = "insert url" onClick = "ubbformat ('url')> <img src =" ubb/quote src = "ubb/wmv.gif" border = "0" alt = "insert video" onClick = "ubbformat ('media')"> <img src = "ubb/image.gif" border = "0" alt = "insert flash" alt = "insert picture" onClick = "Ubbinsert ('img')">
</td>
</r>
<tr>
<td> <textarea name = "content" rows = "10" cols = "80"> </textarea> </td>
</r>
<tr>
<td> </td>
</r>
</table>
</form>
</body>
</html>
ما سبق هو تحليل موجز لمحتوى محرر UBB. آمل أن يكون ذلك مفيدًا لتعلم الجميع ، وآمل أن يدعم الجميع قناة التكنولوجيا الجديدة الخاطئة.