input标签checkbox选中触发事件的方法
1.方法一
<input type="checkbox" onclick="checkboxOnclick(this)" /> <script> function checkboxOnclick(checkbox){ if ( checkbox.checked == true){ //Action for checked }else{ //Action for not checked } }
2.方法二
$('#allSelect').click(function () {
if ($('#allSelect').prop('checked') == true) {
$("[all='1']").prop('checked', true);
} else {
$("[all='1']").prop('checked', false);
}
})

浙公网安备 33010602011771号