Operate the checkbox, select all and invert the selection
//Select all
function checkAll() {
$('input[name="TheID"]').attr("checked", "checked");
}
//Inverse selection
function uncheckAll( ) {
$('input[name="TheID"]').each(function() {
this.checked = !this.checked;
})
}
/ /Get the selected item
function getCheck(){
var check = $('input[name="TheID"]:checkbox').map(function() {
return $(this). val();
}).get().join(',');
return check;
}
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn