Quando estamos realizando projetos BBS, precisamos usar o editor UBB. Os gerentes de back -end geralmente usam o editor CKeditor, e os internautas geralmente usam o editor UBB. Muitas pessoas não sabem muito sobre o editor da UBB. A seguir, o erro é o novo editor. O editor analisa brevemente o editor do UBB para você.
<! Doctype html public "-// w3c // dtd html 4.01 transitória // pt" "'alvo = _blank rel = nofollow> http://www.w3.org/tr/html4/loose.dtd">
<html>
<head>
<title> editor UBB </ititle>
<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;
}
outro
{
isie = false;
}
Função AddText (NewCode)
{
if (document.all) {
insertatcaret (document.ubbform.content, newcode);
document.ubbform.content.focus ();
}
outro
{
document.ubbform.content.value += newCode;
document.ubbform.content.focus ();
}
}
função insertatcaret (textel, texto) {
if (textel.createtextrange && textel.caretpos)
{
var caretpos = textel.caretpos;
caretpos.text += caretpos.text.charat (caretpos.text.length - 2) == ''? texto + '': texto;
}
caso contrário, se (textel)
{
textel.value += texto;
}
outro
{
textel.value = text;
}
}
função ubbformat (o quê)
{
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createrange ();
range.Text = "["+What+"]"+range.text+"[/"+o que+"]";
}
outro
{
txt = window.prompt ("Por favor, digite conteúdo", "");
if (txt! = null) {
Addtxt = "["+what+"]"+txt;
AddText (addtxt);
AddText ("[/"+what+"]");
}
}
}
função ubbinsert (o quê)
{
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createrange ();
range.Text = "["+What+"]"+range.text+"[/"+o que+"]";
}
outro
{
txt = window.prompt ("Por favor, digite conteúdo", "");
if (txt! = null) {
Addtxt = "["+what+"]"+txt;
AddText (addtxt);
AddText ("[/"+what+"]");
}
}
}
função chsize (size) {
if (document.selection && document.selection.type == "text")
{
var range = document.selection.createrange ();
range.text = "[size =" + size + "]" + range.text + "[/size]";
}
outro
{
txt = window.prompt ("Por favor, digite conteúdo", "");
if (txt! = null)
{
Addtxt = "[size ="+size+"]"+txt;
AddText (addtxt);
AddText ("[/size]");
}
}
}
função chfont (font) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.createrange ();
range.Text = "" + range.text + "";
}
outro
{
txt = window.prompt ("Por favor, digite conteúdo", "");
if (txt! = null)
{
Addtxt = ""+txt;
AddText (addtxt);
AddText ("");
}
}
}
função chcolor (cor) {
if (document.selection && document.selection.type == "text") {
var range = document.selection.createrange ();
range.Text = "" + range.text + "";
}
outro
{
txt = window.prompt ("Por favor, digite conteúdo", "");
if (txt! = null) {
Addtxt = ""+txt;
AddText (addtxt);
AddText ("");
}
}
}
//->
</script>
</head>
<Body>
<Form Method = post name = "ubbform" action = "">
<tabela align = "Center" Border = "0">
<tr>
<Td>
<select name = "font" onfocus = "this.SelectedIndex = 0" onchange = "chfont (this.options [this.SelectedIndex] .Value)" size = "1">
<opção value = "" Selected> Selecione Fonte </pption>
<opção value = "宋体"> 宋体 </pption>
<opção value = "BOLD"> BOLD </pption>
<opção value = "Arial"> Arial </pption>
<opção value = "livro antiqua"> livro antiqua </pption>
<opção value = "century gothic"> century gótico </pption>
<opção value = "courier new"> Courier New </pption>
<opção value = "georgia"> Georgia </pption>
<opção value = "Impact"> Impact </pption>
<opção value = "Tahoma"> Tahoma </pption>
<opção value = "Times New Roman"> Times New Roman </pption>
<opção value = "verdana"> verdana </pption>
</leclect>
<select name = "size" onfocus = "this.SelectedIndex = 0" onchange = "chsize (this.options [this.SelectedIndex] .Value)" size = "1">
<opção value = "" Selected> Tamanho da fonte </pption>
<opção value = "-2">-2 </pption>
<opção value = "-1">-1 </pption>
<opção value = "1"> 1 </pption>
<opção value = "2"> 2 </pption>
<opção value = "3"> 3 </pption>
<opção value = "4"> 4 </pption>
<opção value = "5"> 5 </pption>
<opção value = "6"> 6 </pption>
<opção value = "7"> 7 </pption>
</leclect>
<select name = "color" onfocus = "this.SelectedIndex = 0" onchange = "chcolor (this.options [this.SelectedIndex] .Value)" size = "1">
<opção value = "" Selected> cor da fonte </pption>
<opção value = "preto" style = "cor de fundo: preto; cor: preto;"> preto </pption>
<option value = "white" style = "cor de fundo: branco; cor: branco;"> branco </pption>
<opção value = "vermelho" style = "colorent-color: vermelho; cor: vermelho;"> vermelho </pption>
<opção value = "amarelo" style = "cor de fundo: amarelo; cor: amarelo;"> amarelo </pption>
<opção value = "rosa" style = "cor de fundo: rosa; cor: rosa;"> rosa </pption>
<opção value = "verde" style = "colorent-color: verde; cor: verde;"> verde </pption>
<opção value = "laranja" style = "cor de fundo: laranja; cor: laranja;"> laranja </pption>
<opção value = "roxo" style = "background-color: roxo; cor: roxo;"> roxo </pption>
<opção value = "blue" style = "color de fundo: azul; cor: azul;"> azul </pption>
<opção value = "bege" style = "background-color: bege; cor: bege;"> bege </pption>
<opção value = "Brown" style = "cor de fundo: marrom; cor: marrom;"> marrom </pption>
<opção value = "teal" style = "colorido-color: teal; cor: teal;"> teal </pption>
<opção value = "Navy" style = "Background-Color: Navy; cor: Navy;"> Marinha </pption>
<option value = "maroon" style = "background-color: maroon; cor: maroon;"> maroon </pption>
<opção value = "LIMEGREEN" style = "Background-Color: LimeGreen; cor: LimeGreen;"> Limegreen </pption>
</leclect>
</td>
</tr>
<tr>
<Td>
<img src = "ubb/bold.gif" border = "0" alt = "Bold" onclick = "ubbformat ('b')"> <img src = "ubb/italicize.gif" borda = "0" alt = "italic" onclick = "ubbformat ('i' i ')" alt = "sublinhado" onclick = "ubbformat ('u')"> <img src = "ubb/central.gif" border = "0" alt = "alinhamento central" onclick = "ubbformat ('center')"> <img src = "ubb/email.gif" border = "0" ONCLICK = "Ubbformat ('email')"> <img src = "ubb/url.gif" border = "0" alt = "inserir url" onclick = "ubbformat ('url')"> <img src = "ubb/quote.gif" border = "0" alt = " src = "ubb/wmv.gif" border = "0" alt = "inserir vídeo" onclick = "ubbformat ('mídia')"> <img src = "ubb/image.gif" borda = "0" alt = "insert anining" onclick = "ubbinsert ('flash') alt = "inserir imagem" onclick = "ubbinsert ('img')">
</td>
</tr>
<tr>
<Td> <texttarea name = "content" linhas = "10" cols = "80"> </sexttarea> </td>
</tr>
<tr>
<Td> </td>
</tr>
</tabela>
</morm>
</body>
</html>
O exposto acima é uma breve análise do conteúdo do editor UBB. Espero que seja útil para o aprendizado de todos e espero que todos apoiem o novo canal de tecnologia.