<!doctype html>shows{Display:none; } </style><body><ul id= "List" > <li><label><input type= "checkbox" value= "1" > 1. Where's the time? </label></li> <li><label><input type= "checkbox" value= "2" > 2. </label ></li> <li><label><input type= "checkbox" value= "3" > 3. Really love you </label></li> < Li><label><input type= "checkbox" value= "4" > 4. No hesitation </label></li> <li><label> <input type= "checkbox" value= "5" > 5. Glorious years </label></li> <li><label><input type= " CheckBox "value=" 6 "> 6. Like you </label></li></ul><input type=" checkbox "id=" All "><input Type= "button" value= "Select All"class= "BTN" id= "SelectAll" > <input type= "button" value= "All not selected"class= "BTN" id= "unselect" > <input type= "button" value= "Reverse selection"class= "BTN" id= "reverse" > <input type= "button" value= "Get all selected values"class= "BTN" id= "GetValue" > <script type= "Text/javascript" > $("#all"). Click (function(){ if(this.)checked) { $("#list: CheckBox"). Prop ("Checked",true); }Else{ $("#list: CheckBox"). Prop ("Checked",false); } });</script></body>View Code——————————
jquery implements check box selection, inverse selection, and no-select functions