1<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >234<title> New Page </title>5<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>6<meta name= "description" content= ""/>7<meta name= "keywords" content= ""/>8<script type= "Text/javascript" src= ". /jquery-1.4.4.js "></script>9 Ten<script type= "Text/javascript" > One functionSelall () { A$ (". Ho"). attr (' checked ',true); - } - functionSelallnot () { the$ (". Ho"). attr (' checked ',false); - } - functionSelfan () { - //Reverse Selection Operation + //Get all check boxes, traverse, and determine the current selection - for(vari=0; i<$ (". Ho"). Length; i++){ + varFlag = $ (". Ho:eq (" +i+ ")"). attr ("Checked"); A$ (". Ho:eq (" +i+ ")"). attr ("Checked",!flag); at } - } -</script> - -<body> - in -<input type= "checkbox" Name= "hobby[]" id= "Hobbya" class= "ho" value= ' a ' >Basketball to<input type= "checkbox" Name= "hobby[]" id= "hobbyb" class= "ho" value= ' B ' >Football +<input type= "checkbox" Name= "hobby[]" id= "HOBBYC" class= "ho" value= ' C ' >Mountaineering -<input type= "checkbox" Name= "hobby[]" id= "hobbyd" class= "ho" value= ' d ' >Volleyball the *<br/><br/> $<input type= "button" value= "Select All" onclick= "Selall ()"/>Panax Notoginseng<input type= "button" value= "All do not select" onclick= "Selallnot ()"/> -<input type= "button" value= "Reverse Selection" onclick= "Selfan ()"/> the</body> +</body> Ajquery full selection, all-in-all, anti-select operation