原生JS写点击事件
作者:互联网
var allClick = document.getElementById("all1");
// JS监听:http://github.crmeb.net/u/defu
allClick.addEventListener('click',function(){
var bolcheck = this.checked;
var obox=this.parentNode;
var lis=obox.children[2].getElementsByTagName("li");
for(var i=0;i<lis.length;i++){
debugger;
}
$("input[name=item]").each(function(){
$(this).attr("checked", "checked");
})
$("#all2").attr("checked", "");
count();
},false);
标签:原生,function,checked,attr,JS,点击,var,obox 来源: https://blog.51cto.com/u_15128235/2694416