且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何检查复选框数组中的复选框是否使用jquery进行检查

更新时间:2022-10-16 21:41:45

Put this in <head> or in a .js file which is included in <head>.

$(document).ready(function() {
    $("input[name=selectItems]").change(function() {
        $(this).closest("tr").find("input[name^=mileage]").attr("disabled", !this.checked);
    });
});

Here's a live demo.