【JS】checkbox状态

          
            $("input[type=checkbox]:checked").each(function() {
           
                if (this.getAttribute('layertag') === "layer" && this.getAttribute('key') === key && this.getAttribute('dataType') ===
                    dataType) {

                } else {
                    $(this).prop("checked", false);
                    $(this).attr('checked', 'checked');
                    $(this).attr('checked', false);
                    $(this).removeAttr("checked");
                    this.checked = false;
                }
            });

 参考:https://www.cnblogs.com/jpfss/p/9699476.html

posted @ 2020-10-13 16:52  咸鱼翻身  阅读(286)  评论(0编辑  收藏  举报