首页 > 代码库 > JS删除数组总是报错

JS删除数组总是报错

逆向删除
        function onDelete() {
            var list = $(‘input:checkbox[name="zzxsdelete"]‘);
            var indexs = list.length;
            for (var i = indexs-1; i>=0; i--)
            {
                if ($(list[i]).attr("checked") == true)
                {
                    qtgcs.splice(i, 1);
                }
            }
            refresh();
        }

JS删除数组总是报错