具体程序如下:ASP程序中的。function CheckForm(){if (editor.EditMode.checked==true)document.myform.Content.value=editor.HtmlEdit.document.body.innerText;elsedocument.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;if (document.myform.title.value.length == 0) {alert("新闻标题没有填写.");document.myform.title.focus();return false;}if (document.myform.user.value.length == 0) {alert("新闻发布人没有填写");document.myform.user.focus();return false;}return true;}
1 回答

杨魅力
TA贡献1811条经验 获得超6个赞
editor 到底是什么东西?editor.EditMode 说明editor是一个对象,你var editor; 这只是一个变量而已啊。
我看了你这段代码,大概要改改:
function CheckForm()
{
if (editor.HtmlEdit.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.title.value.length == 0) {
alert("新闻标题没有填写.");
document.myform.title.focus();
return false;
}
if (document.myform.user.value.length == 0) {
alert("新闻发布人没有填写");
document.myform.user.focus();
return false;
}
return true;
}
添加回答
举报
0/150
提交
取消