Wenn wir BBS -Projekte durchführen, müssen wir den UBB -Editor verwenden. Backend -Manager verwenden im Allgemeinen den Ckeditor -Editor und die Internetnutzer verwenden im Allgemeinen den UBB -Editor. Viele Leute wissen nicht viel über den UBB -Herausgeber. Das Folgende ist der Fehler neuer Editor. Der Editor analysiert kurz den UBB -Editor für Sie.
<! DocType html public "-// w3c // dtd html 4.01 transitional // en" '' target = _blank rel = nofollow> http://www.w3.org/tr/html4/loose.dtd ">>
<html>
<kopf>
<title> UBB Editor </title>
<meta http-äquiv = "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 = wahr;
}
anders
{
isie = false;
}
Funktion addText (NewCode)
{
if (document.all) {
InsertAtCaret (document.ubbform.content, newCode);
document.ubbform.content.focus ();
}
anders
{
document.ubbform.content.Value += newCode;
document.ubbform.content.focus ();
}
}
Funktion InsertatCaret (Textel, Text) {
if (textel.createTextrange && textel.caretpos)
{
var Caretpos = textel.Caretpos;
Caretpos.Text += Caretpos.text.Charat (Caretpos.Text.length - 2) == ''? Text + '': Text;
}
sonst wenn (textel)
{
textel.Value += text;
}
anders
{
textel.Value = text;
}
}
Funktion ubbformat (was)
{
if (document.Selection && document.Selection.type == "Text")
{
var range = document.Selection.createrange ();
Bereich.Text = "["+was+"]"+reichung.text+"[/"+was+"]";
}
anders
{
txt = window.prompt ("Bitte Inhalt eingeben", "");
if (txt! = null) {
Addtxt = "["+was+"]"+txt;
AddText (addtxt);
AddText ("[/"+was+"]");
}
}
}
Funktion Ubbinsert (was)
{
if (document.Selection && document.Selection.type == "Text")
{
var range = document.Selection.createrange ();
Bereich.Text = "["+was+"]"+reichung.text+"[/"+was+"]";
}
anders
{
txt = window.prompt ("Bitte Inhalt eingeben", "");
if (txt! = null) {
Addtxt = "["+was+"]"+txt;
AddText (addtxt);
AddText ("[/"+was+"]");
}
}
}
Funktion chsize (Größe) {
if (document.Selection && document.Selection.type == "Text")
{
var range = document.Selection.createrange ();
Bereich.Text = "[size =" + size + "]" + range.text + "[/size]";
}
anders
{
txt = window.prompt ("Bitte Inhalt eingeben", "");
if (txt! = null)
{
Addtxt = "[size ="+size+"]"+txt;
AddText (addtxt);
AddText ("[/size]");
}
}
}
Funktion chfont (font) {
if (document.Selection && document.selection.type == "text") {
var range = document.Selection.createrange ();
Bereich.Text = "" + range.text + "";
}
anders
{
txt = window.prompt ("Bitte Inhalt eingeben", "");
if (txt! = null)
{
Addtxt = ""+txt;
AddText (addtxt);
AddText ("");
}
}
}
Funktion chcolor (Farbe) {
if (document.Selection && document.selection.type == "text") {
var range = document.Selection.createrange ();
Bereich.Text = "" + range.text + "";
}
anders
{
txt = window.prompt ("Bitte Inhalt eingeben", "");
if (txt! = null) {
Addtxt = ""+txt;
AddText (addtxt);
AddText ("");
}
}
}
//->
</script>
</head>
<body>
<form methode = 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 = "" Ausgewählt> Schriftart </Option> Wählen Sie
<Option Value = "宋体"> 宋体 </Option>
<option value = "BOLD"> BOLD </option>
<Option Value = "Arial"> Arial </Option>
<Option Value = "Buch Antiqua"> Buch Antiqua </Option>
<Option Value = "Century Gothic"> Century Gothic </Option>
<Option Value = "Courier New"> Courier New </Option>
<Option Value = "Georgia"> 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 = "" Ausgewählt> Schriftgröße </Option>
<Option Value = "-2">-2 </Option>
<Option Value = "-1">-1 </Option>
<Option Value = "1"> 1 </Option>
<Option Value = "2"> 2 </Option>
<Option Value = "3"> 3 </Option>
<Option Value = "4"> 4 </Option>
<Option Value = "5"> 5 </Option>
<Option 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 = "" Ausgewählt> Schriftfarbe </Option>
<option value = "schwarz" style = "Hintergrundfarbe: schwarz; Farbe: schwarz;"> schwarz </option>
<Option Value = "White" style = "Hintergrundfarbe: Weiß; Farbe: Weiß;"> White </Option>
<Option Value = "Red" style = "Hintergrundfarbe: Rot; Farbe: Rot;"> Rot </Option>
<Option Value = "gelb" style = "Hintergrundfarbe: Gelb; Farbe: Gelb;"> Gelb </Option>
<Option Value = "Pink" style = "Hintergrundfarbe: Pink; Farbe: Pink;"> Pink </option>
<Option Value = "Green" style = "Hintergrundfarbe: Grün; Farbe: Grün;"> Grün </Option>
<option value = "orange" style = "Hintergrundfarbe: Orange; Farbe: Orange;"> Orange </option>
<Option Value = "lila" style = "Hintergrundfarbe: lila; Farbe: lila;"> lila </option>
<Option Value = "Blue" style = "Hintergrundfarbe: Blau; Farbe: Blau;"> Blue </option>
<Option Value = "Beige" style = "Hintergrundfarbe: Beige; Farbe: Beige;"> Beige </option>
<Option Value = "Brown" style = "Hintergrundfarbe: braun; Farbe: braun;"> braun </option>
<Option Value = "Teal" style = "Hintergrundfarbe: Teal; Farbe: Teal;"> Teal </option>
<Option Value = "Navy" style = "Hintergrundfarbe: Navy; Farbe: Navy;"> Navy </Option>
<Option Value = "Maroon" style = "Hintergrundfarbe: Maroon; Farbe: Maroon;"> Maroon </Option>
<Option Value = "limegreen" style = "Hintergrundfarbe: Limegreen; Farbe: Limegreen;"> Limegreen </Option>
</select>
</td>
</tr>
<tr>
<td>
<img src = "ubb/bold alt="underline" onClick="ubbFormat('U')"><img src="ubb/center.gif" border="0" alt="center alignment" onClick="ubbFormat('CENTER')"><img src="ubb/email.gif" border="0" alt="Insert EMAIL Address" 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="ubbFormat('QUOTE')"><img src = "ubb/wmv.gif" border = "0" Alt = "Video einfügen" Onclick = "ubbformat ('media')"> <img src = "ubb/image.gif" border = "0" Alt = "bloße Animation" onclick = "ubbinsert ('Flash')") ")"> "<img Src =" ubb/ag. " Alt = "Bild einfügen" onclick = "ubbinsert ('img')">
</td>
</tr>
<tr>
<td> <textarea name = "content" rows = "10" cols = "80"> </textArea> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
Das obige ist eine kurze Analyse des Inhalts des UBB -Editors. Ich hoffe, es wird für das Lernen aller hilfreich sein und ich hoffe, jeder wird den falschen neuen Technologiekanal unterstützen.