var enableArr = []
    //根据id获取指定dom的所有checkbox(nodeList对象)
    var checkboxValueList = document.getElementById('enableCon_true').querySelectorAll('input[type="checkbox"]')
    // 将NodeList转换为数组
    var checkboxValueArr = Array.prototype.slice.call(checkboxValueList)
    checkboxValueArr.forEach(function (node) {
        // 对每个节点执行操作
        console.log(node.value);
        enableArr.push(node)
    });
 posted on 2024-04-24 15:21  一口一只丸子  阅读(83)  评论(0)    收藏  举报