这段代码出了什么问题?

use*_*625 -3 jquery

$('#PbtnSubmit').click(function() {
    if ($("#PricingEditExceptions input:checkbox:checked").length > 0) {
        var chec = $('#PricingEditExceptions input[type=checkbox]:checked');
        var PMstrIDs = chec.map(function() {
             return $(this).val();
        }).get().join(",");
        alert(PMstrIDs);
        $('#1_exceptiontypes').attr('value', exceptiontypes)
        $('#1_PMstrIDs').attr('value', PMstrIDs);
    } else {
        alert("please select atleast one exception");
        return false;
    }
});

 var checked = $('#PricingEditExceptions input[type=checkbox]:checked'); 
Run Code Online (Sandbox Code Playgroud)

此代码在Firefox中返回正确的值,但在IE8中不返回.有什么我需要改变的吗?

为什么我没有在IE8中获得所有选中的复选框?

请有人帮帮我吗?

Zuu*_*uul 10

你的"如果"声明没有关闭...对于IE,这是可以惩罚的死:)