Когда мы делаем проекты 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>
<голова>
<title> ubb Editor </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 = true;
}
еще
{
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) == ''? Текст + '': текст;
}
иначе if (textel)
{
textel.value += text;
}
еще
{
textel.value = text;
}
}
Функция ubbformat (что)
{
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 ("[/"+что+"]");
}
}
}
Функция ubbinsert (что)
{
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 ("[/"+что+"]");
}
}
}
функция chsize (size) {
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createrange ();
range.text = "[size =" + size + "]" + range.text + "[/size]";
}
еще
{
txt = window.prompt («Пожалуйста, введите контент», «»);
if (txt! = null)
{
Addtxt = "[size ="+size+"]"+txt;
AddText (addtxt);
AddText ("[/size]");
}
}
}
функция chfont (font) {
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 ("" ");
}
}
}
функция chcolor (color) {
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>
<тело>
<form method = post name = "ubbform" action = "">
<таблица Align = "center" border = "0">
<tr>
<Td>
<select name = "font" onfocus = "this.selectedIndex = 0" onchange = "Chfont (this.options [this.selectedIndex] .value)" size = "1">
<option value = "" Выбрать> выберите Font </option>
<option value = "宋体"> 宋体 </option>
<option value = "Bold"> Bold </option>
<option value = "arial"> arial </option>
<опция value = "book antiqua"> книга Antiqua </option>
<antain value = "Century Gothic"> Century Gothic </option>
<option value = "courier new"> Courier New </option>
<option value = "Georgia"> Грузия </option>
<option value = "Impact"> Impact </option>
<option value = "tahoma"> Tahoma </option>
<option value = "Times New Roman"> Times New Roman </option>
<option value = "Verdana"> Verdana </option>
</select>
<select name = "size" onfocus = "this.selectedIndex = 0" onchange = "chsize (this.options [this.selectedIndex] .value)" size = "1">
<option value = "" Выбранный> размер шрифта </option>
<vition value = "-2">-2 </option>
<option value = "-1">-1 </option>
<vition value = "1"> 1 </option>
<vition value = "2"> 2 </option>
<option value = "3"> 3 </option>
<vition value = "4"> 4 </option>
<option value = "5"> 5 </option>
<vition value = "6"> 6 </option>
<option value = "7"> 7 </option>
</select>
<select name = "color" onfocus = "this.selectedIndex = 0" onchange = "chcolor (this.options [this.selectedIndex] .value)" size = "1">
<option value = "" Выбранный> цвет шрифта </option>
<option value = "black" style = "фоновый цвет: черный; цвет: черный;"> черный </option>
<опция value = "white" style = "foangy-color: белый; цвет: белый;"> белый </option>
<опция value = "red" style = "fackground-color: red; color: red;"> red </option>
<vitor value = "желтый" style = "фоновый цвет: желтый; цвет: желтый;"> желтый </option>
<option value = "pink" style = "фоновый цвет: pink; color: pink;"> pink </option>
<опция value = "green" style = "фоновый цвет: зеленый; цвет: зеленый;"> green </option>
<option value = "Orange" style = "фоновый цвет: Orange; Color: Orange;"> Orange </option>
<option value = "purple" style = "фоновый цвет: фиолетовый; цвет: фиолетовый;"> Purple </option>
<опция value = "blue" style = "фоновый цвет: синий; цвет: синий;"> Blue </option>
<option value = "beige" style = "foangy-color: beige; color: beige;"> beige </option>
<vitor value = "brown" style = "фоновый цвет: коричневый; цвет: коричневый;"> коричневый </option>
<option value = "teal" style = "фоновый цвет: чир;
<опция value = "Navy" style = "founal-color: Navy; Color: Navy;"> Navy </option>
<опция value = "maroon" style = "фоновый цвет: Maroon; Color: Maroon;"> Maroon </option>
<option value = "limegreen" style = "фоновый цвет: limegreen; color: limegreen;"> limegreen </option>
</select>
</td>
</tr>
<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')"> <img src = "inclick =" ubbformat ('i') "> <img src =" inclick = "ubbformat (" i ') "> <img src =" inclick = "ubbformat (' i ')"> wybbif = "inclick =" ubbformat (' i ') ">". alt = "underline" onclick = "ubbformat ('u')"> <img src = "ubb/center.gif" border = "0" alt = "Центральный выравнивание" onclick = "ubbformat ('center')"> <img src = "ubb/emall.gif" border = "0" alt = "insert arder edlect" onclick = "ubbformat ('email')"> <img src = "ubb/url.gif" border = "0" alt = "insert url" onclick = "ubbformat (" url ') "> <img src =" ubb/quote.gif "border =" 0 "alt =" Quote "onclick =" ubbbmat (Quote "Quote" Quote "<> Quote" Quote "Quote" <> Quote "Quote" <> Quote "<> Quote. src = "ubb/wmv.gif" border = "0" alt = "вставьте видео" onclick = "ubbformat (" media ') "> <img src =" ubb/image.gif "border =" 0 "alt =" Вставка анимации Flash "onclick =" ubbinsert (' flash ') "> <img src src =" ubb/ubb/ubb/ubb/ubb/ubb/ubb/"ubb/" ubb/"ubb/" ubb/"ubb/" ubb/"ubb/ubb/". alt = "вставьте картинку" onclick = "ubbinsert ('img')">
</td>
</tr>
<tr>
<td> <textarea name = "content" row = "10" cols = "80"> </textarea> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
Выше приведено краткий анализ содержания редактора UBB. Я надеюсь, что это будет полезно для каждого обучения, и я надеюсь, что все будут поддерживать неправильный новый технологический канал.