var allClick = document.getElementById("all1"); // JS监听 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);
原生JS写点击事件
var allClick = document.getElementById(&…
本文来自网络,不代表培森的Blog立场,转载请注明出处:https://blog.xupeisen.com/archives/66