日期:2014-05-16  浏览次数:20343 次

请教一下带有ewebeditor编辑器的表单怎么验证?
有熟悉ewebeditor编辑器的吗?想请教一下。为什么客户端的表单验证不能通过,却还能提交到服务器端?
怎样才能验证带有ewebeditor编辑器的表单呐?
比如:
表单form1
题目的文本框input name=title type=text  
文章内容文本框 <textarea name="content1" style="display:none"></textarea> <iframe id="eWebEditor1" src="../../ewebeditor/ewebeditor.asp?id=content1&style=s_blue1&originalfilename=d_originalfilename&savefilename=d_savefilename&savepathfilename=d_savepathfilename" frameborder="0" scrolling="no" width="690" height="350"></iframe>

提交按钮 input name="fabu" type="submit" id="Add" value=" 发 布 "  
对于这样一个表单怎么验证为空》?
请教了。


------解决方案--------------------
if (eWebEditor1.getHTML()=="") {
alert("内容不能为空!");
return false;
}

------解决方案--------------------
验证"content1"就可以了
ewebeditor自动将值写入"content1"