function uubface(containerconID, id) { //function AddemText(id) { facecount++; if (facecount < 10) { document.getElementById(containerconID).value += "[face]" + id + "[/face]"; } return false; //} //document.getElementById(containerconID).value += "[face]" + id + "[/face]"; } //containerID为一个盛放表情的容器ID,containerContentid是一个盛放内容的容器ID function face(containerfaceID ,containerContentid) { for (var i = 1; i < 25; i++) document.getElementById(containerfaceID).innerHTML += ""; } //判断文本框的值是否为空,如果为空则在文本框中显示相应的信息 function CheckNullValue(objid) { if (document.getElementById(objid).value == "") { document.getElementById(objid).value = "您的大名不能为空哦……"; } } //判断电子邮件 function IsEmail(objid) { var r = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/; if (document.getElementById(objid).value != "") { if (!r.exec(document.getElementById(objid).value)) { document.getElementById(objid).value = "您输入的电子邮件有误"; } } } //当获得焦点时,清空email框内容 function clearEmail(objid) { if (document.getElementById(objid).value == "您输入的电子邮件有误") { document.getElementById(objid).value = ""; } } //判断QQ号 function IsQQ(objid) { var r = /^[1-9]\d{4,10}$/; // /\d{5,10}/; if (document.getElementById(objid).value != "") { if (!r.exec(document.getElementById(objid).value)) { document.getElementById(objid).value = "您输入的QQ号有误"; } } } //当获得焦点时清除QQ框内容 function clearQQ(objid) { if (document.getElementById(objid).value == "您输入的QQ号有误") { document.getElementById(objid).value = ""; } } //当失去焦点的时候清空文本框信息 function clearInput(objid) { if (document.getElementById(objid).value == "您的大名不能为空哦……") { document.getElementById(objid).value = ""; } } //向文本框中添加文本 function AddText(NewCode,txtId) { document.getElementById(txtId).value+=NewCode; } var txt, AddTxt; //粗体字 function fnt_b(txtId) { txt = prompt("输入想要变粗的文字", "奈薇建站网 www.nev.cn"); if (txt != null) { AddTxt = "[b]" + txt + "[/b]"; AddText(AddTxt,txtId); } } //斜体字 function fnt_i(txtId) { txt = prompt("输入想要斜体的文字", "奈薇建站网 www.nev.cn"); if (txt != null) { AddTxt = "[i]" + txt + "[/i]"; AddText(AddTxt,txtId); } } //下划线 function fnt_u(txtId) { txt = prompt("输入想要加下划线的文字", "奈薇建站网 www.nev.cn"); if (txt != null) { AddTxt = "[u]" + txt + "[/u]"; AddText(AddTxt,txtId); } }