Home > Web Front-end > JS Tutorial > JQUERY checkbox CHECKBOX select all, cancel all selection_jquery

JQUERY checkbox CHECKBOX select all, cancel all selection_jquery

WBOY
Release: 2016-05-16 19:01:37
Original
1077 people have browsed it

Copy code The code is as follows:



value2
value3




A simpler one:

Copy code The code is as follows:

$("#checkall"). click(
function(){
if(this.checked){
$("input[name='checkname']").each(function(){this.checked=true;}) ;
}else{
$("input[name='checkname']").each(function(){this.checked=false;});
}
}
);
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template