<script language="javascript" type="text/javascript">
var oEditer;
function CustomValidate(source, arguments)
{
var value = oEditer.GetXHTML(true);
if(value=="")
{
arguments.IsValid = false;
}
else
{
arguments.IsValid = true;
}
}
function FCKeditor_OnComplete( editorInstance )
{
oEditer = editorInstance;
}
</script>
var oEditer;
function CustomValidate(source, arguments)
{
var value = oEditer.GetXHTML(true);
if(value=="")
{
arguments.IsValid = false;
}
else
{
arguments.IsValid = true;
}
}
function FCKeditor_OnComplete( editorInstance )
{
oEditer = editorInstance;
}
</script>
验证码
<asp:CustomValidator ID="RequiredFieldValidator" runat="server" ClientValidationFunction="CustomValidate" ValidateEmptyText="true"
ControlToValidate="fckEditor" ErrorMessage="内容不能为空!"></asp:CustomValidator>