如何使用javascript对FCKeditor的必填字段进行验证。

最佳答案

试试这个,

var EditorInstance = FCKeditorAPI.GetInstance('message') ;
if(EditorInstance.EditorDocument.body.innerText.length<=0)
{
alert("This firld is mandatory");
EditorInstance.EditorDocument.body.focus();
return false;
}

来源:

http://dreamtechworld.wordpress.com/2008/12/06/validating-firld-in-fckeditor-using-javascript/

关于javascript - 验证FCKeditor,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3757964/

10-13 03:39