ASP.NET jQuery 实例15 通过控件CustomValidator验证CheckBoxList

首先看下界面代码:
复制代码 代码如下:















请选择汽车类型:












ForeColor="Red" ClientValidationFunction="ctvCar_Validation">



控件CustomValidator相关参数说明:
ErrorMessage:设置校验提示信息
Display:设置显示模式,Dynamic表示提示信息不显示的时候,不占用当前位置
ClientValidationFunction:设置定义客户端自定义校验函数
客户端脚本代码:
复制代码 代码如下:


Recipe15




最终显示效果:

ASP.NET jQuery 实例15 通过控件CustomValidator验证CheckBoxList_第1张图片

你可能感兴趣的:(ASP.NET jQuery 实例15 通过控件CustomValidator验证CheckBoxList)