jquery 对asp.net CheckBoxList全选、反选
2011-08-09 15:49
661 查看
第一种:
全选
$(".checkBoxSelect").each(function(){
$(this).attr("checked",
true);
});
反选
$(".checkBoxSelect").each(function(){
if($(this).attr("checked"))
{
$(this).attr("checked",
false);
}
else
{
$(this).attr("checked",
true);
}
});
第二种
全选
$("#<%=CheckBoxList.ClientID%>input:checkbox").each(function(index,domEle){
if(this.type=="checkbox")
this.checked=true;
});反选
$("#<%=CheckBoxList.ClientID%>input:checkbox").each(function(index,domEle){
if(this.type=="checkbox")
this.checked=!this.checked;
});
全选
$(".checkBoxSelect").each(function(){
$(this).attr("checked",
true);
});
反选
$(".checkBoxSelect").each(function(){
if($(this).attr("checked"))
{
$(this).attr("checked",
false);
}
else
{
$(this).attr("checked",
true);
}
});
第二种
全选
$("#<%=CheckBoxList.ClientID%>input:checkbox").each(function(index,domEle){
if(this.type=="checkbox")
this.checked=true;
});反选
$("#<%=CheckBoxList.ClientID%>input:checkbox").each(function(index,domEle){
if(this.type=="checkbox")
this.checked=!this.checked;
});
相关文章推荐
- ASP.NET jQuery 实例6 (实现CheckBoxList成员全选或全取消)
- ASP.NET jQuery 食谱6 (实现CheckBoxList成员全选或全取消)
- ASP.NET jQuery 实例6 (实现CheckBoxList成员全选或全取消)
- asp.net绑定checkboxlist--------jquery绑定click事件,获取checkbox的value和显示值
- ASP.NET jQuery 随笔 显示CheckBoxList成员选中的内容
- ASP.NET CheckBoxList 用javascript 实现全选
- ASP.NET jQuery 实例5 (显示CheckBoxList成员选中的内容)
- ASP.NET绑定CHECKBOXLIST--------JQUERY绑定CLICK事件,获取CHECKBOX的VALUE和显示值
- ASP.NET CheckBoxList 控件实现全选、反选、清除功能 利用js
- asp.net checkboxlist 后台动态绑定,前台jquery获取value
- Check/Uncheck all Items in an ASP.NET CheckBox List using jQuery
- Jquery 获取Asp.Net CheckBoxList的Value,Text
- ASP.NET jQuery 食谱15 (通过控件CustomValidator验证CheckBoxList)
- ASP.NET jQuery 实例5 (显示CheckBoxList成员选中的内容)
- ASP.NET CheckBoxList 空间实现全选、反选、清除功能
- ASP.NET jQuery 食谱5 (显示CheckBoxList成员选中的内容)
- asp.net绑定checkboxlist--------jquery绑定click事件,获取checkbox的value和显示值
- ASP.NET CheckBoxList Operations with jQuery
- Asp.net(C#/2.0) 部分全选 CheckBoxList
- ASP.NET CheckBoxList Operations with jQuery