jquery implements check box selection, inverse selection, and no-select functions

Source: Internet
Author: User

<!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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.