Skip to main content

考虑浏览器兼容性获取指定 div 中所有 checkbox

属性选择器:input[type=checkbox]

//不兼容IE6 IE7
document.querySelectorAll('div>input[type=checkbox]')

参考文章:兼容 IE6 IE7 https://www.jianshu.com/p/872d69047dda