zoukankan
html css js c++ java
验证CheckBoxList至少要有一项选中
<
script
language
="javascript"
type
="text/javascript"
>
<!--
function
ClientValidate(sender, args)
{
var
flag
=
false
;
var
inarr
=
form1.all.tags(
"
input
"
);
for
(
var
i
=
0
; i
<
inarr.length; i
++
)
{
if
(inarr[i].type
==
"
checkbox
"
)
{
if
(inarr[i].checked
==
true
)
{
flag
=
true
;
}
}
}
if
(flag)
{
args.IsValid
=
true
;
}
else
{
args.IsValid
=
false
;
}
}
-->
</
script
>
<
tr
>
<
td
align
="right"
bgcolor
="#FFFFFF"
>
用户权限:
</
td
>
<
td
bgcolor
="#FFFFFF"
><
asp:CheckBoxList
ID
="cblrighgs"
runat
="server"
RepeatLayout
="Flow"
RepeatColumns
="5"
>
</
asp:CheckBoxList
>
<
asp:CustomValidator
ID
="CustomValidator1"
runat
="server"
ClientValidationFunction
="ClientValidate"
Display
="Dynamic"
ErrorMessage
="请选择用户权限"
></
asp:CustomValidator
></
td
>
</
tr
>
查看全文
相关阅读:
594 One Little, Two Little, Three Little Endians
提出js框
从4个细节做好查询语句优化
Windows Sever2008 R2 iis部署
收集 常用CSS样式的笔记
html常用标签介绍
加密URL
JQuery UI选项卡插件及图片轮播插件
推荐两款富文本编辑器:NicEdit和Kindeditor
合并一条SQL语句 根据不同条件
原文地址:https://www.cnblogs.com/cnaspnet/p/729473.html
最新文章
系统弹出 Font capture:acrord32info.exe 应用程序错误
倒立
C++高级主题之复制构造函数
ACM程序设计大赛
论文参考文献的引用及自动编号
医学影像处理涉及的名词
ACM程序设计大赛简介
关于CBitmap,LoadBitmap 的使用
调整ubuntu10.04 窗口关闭按钮的位置
短时间倒立有利大脑
热门文章
Visual C++ 2010 新特性:并行计算
structures in c
482 Permutation Arrays
340 MasterMind Hints
构造函数中的异常
10474 Where is the Marble?
the use of typeid
setjmp && longjmp
10785 The Mad Numerologist
10420 List of Conquests
Copyright © 2011-2022 走看看