checkbox 触发两次问题
2016-05-03 17:26
211 查看
function itemList_check(itemList) {
debugger;
if (itemList.type != "checkbox") {
$(itemList).find(":checkbox").click(function () {
itemList.stopPropagation();
});
}
else {
var m=$(itemList).attr("index_item");
var checkAll = $(itemList).is(':checked');
alert(checkAll);
if (checkAll) {
data[m].AffairReciveType = 1;
alert("选择");
return;
}
else {
//data[m].AffairReciveType = 0;
alert("不选择");
}
}
}
debugger;
if (itemList.type != "checkbox") {
$(itemList).find(":checkbox").click(function () {
itemList.stopPropagation();
});
}
else {
var m=$(itemList).attr("index_item");
var checkAll = $(itemList).is(':checked');
alert(checkAll);
if (checkAll) {
data[m].AffairReciveType = 1;
alert("选择");
return;
}
else {
//data[m].AffairReciveType = 0;
alert("不选择");
}
}
}
相关文章推荐
- MVC部署到IIS 出现未能加载文件或程序集“System.Web.Http.WebHost.....
- C++中explict关键字用法
- hdu 3047 Zjnu Stadium【带权并查集】
- 在ubuntu上建立Sphinx,出现Shpinx-quickstart:command not found
- 怎样提高支付系统的安全性及稳定性?
- Windows下配置Mysql5.7
- 5月3日科目二考试总结
- JavaScript中cookie使用
- 【转】TCP协议中的三次握手和四次挥手(图解)
- 慢性咽炎
- ArcGIS教程:什么是 ArcGIS 中的报表?
- 字符串处理------全排列
- rpm软件下载地址
- Android之SQLite数据库的使用
- 支付宝在ios中的应用2
- Struts2中动态方法的三种调用方式
- JAVA System.getProperty() 与 System.getenv() 差异及示例
- UCOS 杂项 笔记
- AngularJS 中的 factory、 service 和 provider区别,简单易懂
- shader forge 不用编程的shader