FCKeditor自定义验证
来源:互联网 发布:java集合类迭代器 编辑:程序博客网 时间:2024/05/21 14:59
<script type="text/javascript">
var fckeditorContentLength = 0;
//自定义难控件所邦定的客服端事件
function checkFckeditorContent(source, arguments) {
arguments.IsValid = (fckeditorContentLength > 0);
}
//FCK加载完毕后会自动调用名字为FCKeditor_OnComplete的函数;
//将自身作为参数传递进来
function FCKeditor_OnComplete(editorInstance) {
//附加失去焦点的事件
editorInstance.Events.AttachEvent('OnBlur', FCKeditor_OnBlur);
}
function FCKeditor_OnBlur(editorInstance) {
fckeditorContentLength = editorInstance.GetXHTML(true).length;
//在FCKeditor失去焦点时,如果内容不为空则隐藏验证提示
if (fckeditorContentLength > 0) {
document.getElementById("valxFCK").style.display = "none";
}
}
</script>
//自定义验证控件,记住不要设置ControlToValidate属性
<asp:CustomValidator ID="valxFCK" runat="server" ErrorMessage="请输入内容"
ValidationGroup="group1" Text="请输入内容"
Display="Dynamic" ClientValidationFunction="checkFckeditorContent"
onservervalidate="valxFCK_ServerValidate"></asp:CustomValidator>
- FCKeditor自定义验证
- asp.net FCKeditor自定义非空验证
- FCKeditor 数据验证
- FCKEditor使用RequiredFieldValidator验证
- FCKeditor的js验证
- FCKeditor的js验证
- FCKeditor添加自定义按钮
- FckEditor自定义工具条
- 自定义FCKEditor中的“样式”
- fckeditor添加自定义按钮
- FckEditor自定义按钮
- FCKeditor(2.6)自定义工具栏
- fckeditor自定义工具栏控件
- FCKeditor中自定义工具栏
- 纯 JS FCKEditor 输入验证
- fckeditor对身份进行验证
- FCKEditor中增加自定义行为
- 自定义fckeditor上传的文件名
- The Xen Store
- I/O复用
- 基于verilog按键消抖设计
- xenstored为什么不能重启?
- 如何引用一个已经定义过的全局变量 与 全局变量可不可以定义在可被多个.C文件包含的头文件中
- FCKeditor自定义验证
- 反垄断沦为利益工具让人哭笑不得
- Qt中的QString和QByteArray
- Android 2.3 SD卡挂载流程浅析(三)
- 关于云计算之个人理解
- 图像处理之噪声之美 - 随机噪声产生
- 6款常用的Java开源报表制作工具
- Xen, Linux and udev
- UML系列 (二)四种关系