jQuery判断checkbox是否选中的方法

if($('#checkbox-id').is(':checked')) {

    // do something
}

if ($('#checkbox-id').attr('checked')) {
    // do something
}

猜你喜欢

转载自www.cnblogs.com/historylyt/p/9072288.html