接下来
function submitonce(theform)
{
if (document.all||document.getElementById)
{
for (i=0;i<theform.length;i++)
{
var tempobj=theform.elements[i];
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true;
}
}
}
function checklength(theform)
{
alert("ÄãµÄÐÅÏ¢ÒѾ­ÓÐ "+theform.atc_content.value.length+" ×Ö½Ú.");
}
function AddText(NewCode)
{
if (document.FORM.atc_content.createTextRange && document.FORM.atc_content.caretPos)
{
var caretPos = document.FORM.atc_content.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
}
else
{
document.FORM.atc_content.value+=NewCode
}
setfocus();
}
function setfocus()
{
document.FORM.atc_content.focus();
}
defaultmode = "divmode";if (defaultmode == "nomode") {
helpmode = false;
divmode = false;
nomode = true;
} else if (defaultmode == "helpmode") {
helpmode = true;
divmode = false;
nomode = false;
} else {
helpmode = false;
divmode = true;
nomode = false;
}
function submitonce(theform)
{
if (document.all||document.getElementById)
{
for (i=0;i<theform.length;i++)
{
var tempobj=theform.elements[i];
if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
tempobj.disabled=true;
}
}
}
function checklength(theform)
{
alert("ÄãµÄÐÅÏ¢ÒѾ­ÓÐ "+theform.atc_content.value.length+" ×Ö½Ú.");
}
function AddText(NewCode)
{
if (document.FORM.atc_content.createTextRange && document.FORM.atc_content.caretPos)
{
var caretPos = document.FORM.atc_content.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? NewCode + ' ' : NewCode;
}
else
{
document.FORM.atc_content.value+=NewCode
}
setfocus();
}
function setfocus()
{
document.FORM.atc_content.focus();
}
defaultmode = "divmode";if (defaultmode == "nomode") {
helpmode = false;
divmode = false;
nomode = true;
} else if (defaultmode == "helpmode") {
helpmode = true;
divmode = false;
nomode = false;
} else {
helpmode = false;
divmode = true;
nomode = false;
}
function checkmode(swtch){
if (swtch == 1){
nomode = false;
divmode = false;
helpmode = true;
alert("Ofstar ´úÂë - °ïÖúÐÅÏ¢\n\nµã»÷ÏàÓ¦µÄ´úÂë°´Å¥¼´¿É»ñµÃÏàÓ¦µÄ˵Ã÷ºÍÌáʾ");
} else if (swtch == 0) {
helpmode = false;
divmode = false;
nomode = true;
alert("Ofstar ´úÂë - Ö±½Ó²åÈë\n\nµã»÷´úÂë°´Å¥ºó²»³öÏÖÌáʾ¼´Ö±½Ó²åÈëÏàÓ¦´úÂë");
} else if (swtch == 2) {
helpmode = false;
nomode = false;
divmode = true;
alert("Ofstar ´úÂë - Ìáʾ²åÈë\n\nµã»÷´úÂë°´Å¥ºó³öÏÖÏòµ¼´°¿Ú°ïÖúÄúÍê³É´úÂë²åÈë");
}
}
function showsize(size) {
if (helpmode) {
alert("ÎÄ×Ö´óС±ê¼Ç\nÉèÖÃÎÄ×Ö´óС.\n¿É±ä·¶Î§ 1 - 6.\n 1 Ϊ×îС 6 Ϊ×î´ó.\nÓ÷¨: [size="+size+"]ÕâÊÇ "+size+" ÎÄ×Ö[/size]");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="[size="+size+"]"+text+"[/size]";
AddText(AddTxt);
} else {
txt=prompt("´óС "+size,"ÎÄ×Ö");
if (txt!=null) {
AddTxt="[size="+size+"]"+txt;
AddText(AddTxt);
AddTxt="[/size]";
AddText(AddTxt);
}
}
}function showfont(font) {
if (helpmode){
alert("×ÖÌå±ê¼Ç\n¸øÎÄ×ÖÉèÖÃ×ÖÌå.\nÓ÷¨: [font="+font+"]¸Ä±äÎÄ×Ö×ÖÌåΪ"+font+"[/font]");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="[font="+font+"]"+text+"[/font]";
AddText(AddTxt);
} else {
txt=prompt("ÒªÉèÖÃ×ÖÌåµÄÎÄ×Ö"+font,"ÎÄ×Ö");
if (txt!=null) {
AddTxt="[font="+font+"]"+txt;
AddText(AddTxt);
AddTxt="[/font]";
AddText(AddTxt);
}
}
}
function showcolor(color) {
if (helpmode) {
alert("ÑÕÉ«±ê¼Ç\nÉèÖÃÎı¾ÑÕÉ«. ÈκÎÑÕÉ«Ãû¶¼¿ÉÒÔ±»Ê¹ÓÃ.\nÓ÷¨: [color="+color+"]ÑÕÉ«Òª¸Ä±äΪ"+color+"µÄÎÄ×Ö[/color]");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="[color="+color+"]"+text+"[/color]";
AddText(AddTxt);
} else {
txt=prompt("Ñ¡ÔñµÄÑÕÉ«ÊÇ: "+color,"ÎÄ×Ö");
if(txt!=null) {
AddTxt="[color="+color+"]"+txt;
AddText(AddTxt);
AddTxt="[/color]";
AddText(AddTxt);
}
}
}function bold() {
if (helpmode) {
alert("¼Ó´Ö±ê¼Ç\nʹÎı¾¼Ó´Ö.\nÓ÷¨: ÕâÊǼӴֵÄÎÄ×Ö");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt=""+text+"";
AddText(AddTxt);
} else {
txt=prompt("ÎÄ×Ö½«±»±ä´Ö.","ÎÄ×Ö");
if (txt!=null) {
AddTxt=""+txt;
AddText(AddTxt);
AddTxt="";
AddText(AddTxt);
}
}
}function italicize() {
if (helpmode) {
alert("бÌå±ê¼Ç\nʹÎı¾×ÖÌå±äΪбÌå.\nÓ÷¨: ÕâÊÇбÌå×Ö");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt=""+text+"";
AddText(AddTxt);
} else {
txt=prompt("ÎÄ×Ö½«±äбÌå","ÎÄ×Ö");
if (txt!=null) {
AddTxt=""+txt;
AddText(AddTxt);
AddTxt="";
AddText(AddTxt);
}
}
}function quoteme() {
if (helpmode){
alert("ÒýÓñê¼Ç\nÒýÓÃһЩÎÄ×Ö.\nÓ÷¨: ");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="";
AddText(AddTxt);
} else {
txt=prompt("±»ÒýÓõÄÎÄ×Ö","ÎÄ×Ö");
if(txt!=null) {
AddTxt="";
AddText(AddTxt);
}
}
}
function setfly() {
if (helpmode){
alert("·ÉÐбê¼Ç\nʹÎÄ×Ö·ÉÐÐ.\nÓ÷¨: [fly]ÎÄ×ÖΪÕâÑùÎÄ×Ö[/fly]");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="[fly]"+text+"[/fly]";
AddText(AddTxt);
} else {
txt=prompt("·ÉÐÐÎÄ×Ö","ÎÄ×Ö");
if (txt!=null) {
AddTxt="[fly]"+txt;
AddText(AddTxt);
AddTxt="[/fly]";
AddText(AddTxt);
}
}
}function movesign() {
if (helpmode) {
alert("Òƶ¯±ê¼Ç\nʹÎÄ×Ö²úÉúÒƶ¯Ð§¹û.\nÓ÷¨: [move]Òª²úÉúÒƶ¯Ð§¹ûµÄÎÄ×Ö[/move]");
} else if (nomode || document.selection && document.selection.type == "Text") {
AddTxt="[move]"+text+"[/move]";
AddText(AddTxt);
} else {
txt=prompt("Òª²úÉúÒƶ¯Ð§¹ûµÄÎÄ×Ö","ÎÄ×Ö");
if (txt!=null) {
AddTxt="[move]"+txt;
AddText(AddTxt);
AddTxt="[/move]";
AddText(AddTxt);
}
}
}