<!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=true;
}
else
{
isIE=false;
}
function AddText(NewCode)
{
if(document.all){
insertAtCaret(document.ubbform.Content, NewCode);
document.ubbform.Content.focus();
}
else
{
document.ubbform.Content.value += NewCode;
document.ubbform.Content.focus();
}
}
function insertAtCaret (textEl, text){
if (textEl.createTextRange && textEl.caretPos)
{
var caretPos = textEl.caretPos;
caretPos.text += caretPos.text.charAt(caretPos.text.length - 2) == ' ' ? text + ' ' : text;
}
else if(textEl)
{
textEl.value += text;
}
else
{
textEl.value = text;
}
}
function ubbFormat(what)
{
if (document.selection && document.selection.type == "Text")
{
var range = document.selection.createRange();
range.text = "["+what+"]" + range.text + "[/"+what+"]";
}
else
{
txt=window.prompt("请输入内容","");
if (txt!=null) {
AddTxt="["+what+"]"+txt;
UBB编辑器
内容版权声明:除非注明,否则皆为本站原创文章。