0
下面是我的jQuery這裏如何讓複選框使用jQuery檢查數據在Struts Action類數據和Ajax,請跟我說清楚如何發送選中複選框使用jQuery和Ajax Struts Action類
<script>
$(document).ready(function() {
$('#dataTables-example').DataTable({
responsive : true,
"order":[],
"columnDefs": [ {
"targets": 0,
"orderable": false,
"className": "dt-center"
}]
});
$("#selectall").click(function() {
$('.case').prop('checked', this.checked);
if ($('.case').prop('checked', this.checked)) {
count = this.checked ? $(".case").length : 0;
smsCount.innerHTML = count;
}
});
$(".case").click(function() {
count = $(".case:checked").length;
if ($(".case").length == $(".case:checked").length) {
$("#selectall").prop("checked", true);
} else {
$("#selectall").prop("checked", false);
}
smsCount.innerHTML = count;
});
});
});
</script>
'input'-tag缺少名稱:'' – beendr
Good catch,thx – steven35