In the construction of the site, let the check box and all the cancellation is more commonly used, the following describes how to use a sentence to solve the full selection function;
In fact, it is very simple, that is, using the function of counting jquery deprecated the last piece of code in this article;
Well, the method I want to introduce is finished;
650) this.width=650; "alt=" u=3644218134,974193839&fm=21&gp=0_ copy. jpg "src=" http://www.baijunyao.com/Upload /image/ueditor/20150429/1430237383729242.jpg "title=" 1430237383729242.jpg "/>
Well, don't smash the eggs; I'm kidding. The code is below
JavaScript section:
function Checkall (obj) {$ ("#box input[type= ' checkbox ']"). Prop (' Checked ', $ (obj). Prop (' checked '));}
HTML section:
<div id= "box" > <input type= "checkbox" onclick= "Checkall (This)" > select all <br><br> <input type= "ch Eckbox "><br> <input type=" checkbox "><br> <input type=" checkbox "><br> <input t ype= "checkbox" ><br> <input type= "checkbox" ><br> <input type= "checkbox" ><br> < Input type= "checkbox" ><br> <input type= "checkbox" ><br> <input type= "checkbox" ><br> </div>
This article for Bai Jun Remote original article, reprinted without contact with me, but please specify from Bai Jun remote blog baijunyao.com
This article is from the "Bai Jun Remote Blog" blog, please be sure to keep this source http://shuaibai123.blog.51cto.com/10163353/1640124
One line of jquery code to make the checkbox select All and select All