zoukankan      html  css  js  c++  java
  • asp.net 自定义控件验证FCKeditor是否为空

    //验证FCKeditor是否为空
    function FckCustomValidate(source, arguments) {
        var fckFrame = document.getElementById(source.controltovalidate + "___Frame").contentWindow;
        var value = fckFrame.FCK.GetHTML(fckFrame.FCKConfig.FormatOutput);
        if (value == "") {
            arguments.IsValid = false;
        }
        else {
            arguments.IsValid = true;
        }
    }

    <FCKeditorV2:FCKeditor ID="fckContent" runat="server" Width="100%" Height="400px">
            </FCKeditorV2:FCKeditor><asp:CustomValidator ID="CustomValidator1" runat="server" ErrorMessage="必填" ControlToValidate="fckContent" ClientValidationFunction="FckCustomValidate"></asp:CustomValidator>

  • 相关阅读:
    还得还得学啊
    感觉自己写的东西很死板啊
    好烦啊,不知道选哪个?
    222
    111
    愁人啊
    ssm+ajax实现登陆
    ssm框架搭建
    抽象类与接口
    代理设计模式
  • 原文地址:https://www.cnblogs.com/yuncheng/p/2792238.html
Copyright © 2011-2022 走看看