Cuando estamos haciendo proyectos BBS, necesitamos usar el editor UBB. Los administradores de back -end generalmente usan el editor de Ckeditor, y los internautas generalmente usan el editor UBB. Muchas personas no saben mucho sobre el editor de UBB. El siguiente es el error de error. El editor analiza brevemente el editor de UBB para usted.
<! DocType html public "-// w3c // dtd html 4.01 transitional // en" "'target = _blank rel = nofollow> http://www.w3.org/tr/html4/loose.dtd">
<html>
<Evista>
<title> editor de UBB </title>
<meta http-oquiv = "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 = verdadero;
}
demás
{
isie = falso;
}
función addText (nuevo código)
{
if (document.all) {
insertAtcaret (document.ubbform.content, newcode);
document.ubbform.content.focus ();
}
demás
{
document.ubbform.content.value += newcode;
document.ubbform.content.focus ();
}
}
función insertAtcaret (textel, text) {
if (textel.createTextrange && textel.caretpos)
{
var careTPOS = textel.caretpos;
caretpos.text += caretpos.text.charat (caretpos.text.length - 2) == ''? texto + '': texto;
}
else if (textel)
{
textel.value += text;
}
demás
{
textel.value = text;
}
}
función ubbformat (qué)
{
if (document.selection && document.selection.type == "texto")
{
var range = document.selection.CreaterGe ();
range.text = "["+what+"]"+range.text+"[/"+what+"]";
}
demás
{
txt = window.prompt ("por favor ingrese el contenido", "");
if (txt! = null) {
Addtxt = "["+What+"]"+txt;
AddText (addTxt);
AddText ("[/"+What+"]");
}
}
}
función ubbinsert (qué)
{
if (document.selection && document.selection.type == "texto")
{
var range = document.selection.CreaterGe ();
range.text = "["+what+"]"+range.text+"[/"+what+"]";
}
demás
{
txt = window.prompt ("por favor ingrese el contenido", "");
if (txt! = null) {
Addtxt = "["+What+"]"+txt;
AddText (addTxt);
AddText ("[/"+What+"]");
}
}
}
función chsize (tamaño) {
if (document.selection && document.selection.type == "texto")
{
var range = document.selection.CreaterGe ();
range.text = "[size =" + size + "]" + range.text + "[/size]";
}
demás
{
txt = window.prompt ("por favor ingrese el contenido", "");
if (txt! = null)
{
Addtxt = "[size ="+size+"]"+txt;
AddText (addTxt);
AddText ("[/size]");
}
}
}
función chfont (fuente) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.CreaterGe ();
range.text = "" + range.text + "";
}
demás
{
txt = window.prompt ("por favor ingrese el contenido", "");
if (txt! = null)
{
Addtxt = ""+txt;
AddText (addTxt);
AddText ("");
}
}
}
función chcolor (color) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.CreaterGe ();
range.text = "" + range.text + "";
}
demás
{
txt = window.prompt ("por favor ingrese el contenido", "");
if (txt! = null) {
Addtxt = ""+txt;
AddText (addTxt);
AddText ("");
}
}
}
//->
</script>
</ablo>
<Body>
<Form 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">
<opción valor = "" seleccionado> seleccionar fuente </opción>
<opción valor = "宋体"> 宋体 </opción>
<opción value = "Bold"> Bold </opción>
<opción valor = "arial"> arial </ppection>
<opción valor = "book antiqua"> book antiqua </opción>
<opción valor = "Century gótico"> Century Gothic </ppection>
<opción valor = "Courier New"> Courier New </ppection>
<opción valor = "georgia"> georgia </opción>
<opción valor = "impacto"> Impact </option>
<opción valor = "tahoma"> tahoma </ppection>
<opción valor = "Times New Roman"> Times New Roman </ppection>
<opción valor = "verdana"> verdana </ppection>
</select>
<select name = "size" onfocus = "this.selectedIndex = 0" onChange = "chsize (this.options [this.selectedIndex] .value)" size = "1">
<opción valor = "" seleccionado> tamaño de fuente </ppection>
<opción valor = "-2">-2 </opción>
<opción valor = "-1">-1 </opción>
<opción valor = "1"> 1 </opción>
<opción valor = "2"> 2 </opción>
<opción valor = "3"> 3 </opción>
<opción valor = "4"> 4 </opción>
<opción valor = "5"> 5 </opción>
<opción valor = "6"> 6 </opción>
<opción valor = "7"> 7 </opción>
</select>
<select name = "color" onfocus = "this.selectedIndex = 0" onChange = "chcolor (this.options [this.selectedIndex] .Value)" size = "1">
<opción valor = "" seleccionado> color de fuente </ppection>
<opción valor = "negro" style = "de fondo: negro; color: negro;"> negro </ppection>
<opción valor = "blanco" style = "Color de fondo: blanco; color: blanco;"> blanco </ppection>
<opción valor = "rojo" style = "de fondo: rojo; color: rojo;"> rojo </ppection>
<opción valor = "amarillo" style = "Color de fondo: amarillo; color: amarillo;"> amarillo </ppection>
<opción valor = "rosa" style = "de fondo: rosa; color: rosa;"> rosa </ppection>
<opción valor = "verde" style = "de fondo: verde; color: verde;"> verde </ppection>
<opción valor = "naranja" style = "de fondo: naranja; color: naranja;"> naranja </opción>
<opción valor = "púrpura" style = "de fondo: púrpura; color: púrpura;"> púrpura </opción>
<opción valor = "azul" style = "de fondo: azul; color: azul;"> azul </ppection>
<opción valor = "beige" style = "de fondo: beige; color: beige;"> beige </opción>
<opción value = "brown" style = "Color de fondo: marrón; color: marrón;"> marrón </opción>
<opción value = "teal" style = "de fondo: Teal; color: teal;"> Teal </ppection>
<opción value = "Navy" style = "de fondo: Navy; color: Navy;"> Navy </opción>
<opción value = "maroon" style = "de fondo: maroon; color: marrón;"> marrón </opción>
<opción valor = "limegreen" style = "de fondo: limegreen; color: limegreen;"> limegreen </ppection>
</select>
</td>
</tr>
<tr>
<TD>
<img src = "ubb/back.gif" border = "0" alt = "back" onClick = "ubbformat ('b' b ')"> <img src = "ubb/iticackicize.gif" border = "0" alt = "italic" onClick = "UBBFormat (' i ')"> <Mg src = "Ubb/Underline.giF" border ". alt = "Underline" onClick = "Ubbformat ('u')"> <img src = "ubb/center.gif" border = "0" Alt = "Center Alignment" onClick = "UBBFormat ('Center')"> <img src = "Ubb/correo electrónico.gif" border = "0" ALT = "Dirección de correo electrónico" onClick = "UbbFormat ('Correo electrónico')"> <img src = "ubb/url.gif" border = "0" alt = "insertar url" onClick = "ubbformat ('url')"> <img src = "Ubb/quote.gif" borde = "0" alt = "citas" src = "ubb/wmv.gif" border = "0" alt = "insertar video" onClick = "Ubbformat ('Media')"> <img src = "ubb/image.gif" border = "0" alt = "Insertar Flash Animation" onClick = "Ubbinsert ('flash')"> <Mg src = "UBB/Image.gif.gif" Border ". imagen "onClick =" ubbinsert ('img') ">
</td>
</tr>
<tr>
<TD> <TextAREA name = "Content" Rows = "10" cols = "80"> </extAREA> </td>
</tr>
<tr>
<TD> </td>
</tr>
</table>
</form>
</body>
</html>
Lo anterior es un breve análisis del contenido del editor de UBB. Espero que sea útil para el aprendizaje de todos, y espero que todos apoyen el nuevo canal de tecnología incorrecto.