<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <title>Title</title></Head><Body><Div> <inputtype= "button"value= "Select All"onclick= "Allselect ()"> <inputtype= "button"value= "Reverse Selection"onclick= "Reverseselect ()"> <inputtype= "button"value= "Cancel"onclick= "Deleteselect ()"></Div><TableBorder= "1"> <thead> <TR> <th>Choose</th> <th>Ip</th> <th>Post</th> </TR> </thead> <tbodyID= "TB"> <TR> <TD><inputtype= "checkbox"></TD> <TD>1.1.1.1</TD> <TD>80</TD> </TR> <TR> <TD><inputtype= "checkbox"></TD> <TD>1.1.1.1</TD> <TD>80</TD> </TR> <TR> <TD><inputtype= "checkbox"></TD> <TD>1.1.1.1</TD> <TD>80</TD> </TR> </tbody></Table><Scriptsrc=".. /jquery-2.12.4.js "></Script><Script> functionAllselect () {varv=$('#tb input[type= "checkbox"]'); Console.log (v); V.prop ('checked', true) } functionDeleteselect () {varv= $('#tb input[type= "checkbox"]'); V.prop ('checked', false) } functionReverseselect () {$ ('#tb input[type= "checkbox"]'). each (function () { if($( This). Prop ('checked')){ $( This). Prop ('checked', false); } Else{ $( This). Prop ('checked', true); } }) }</Script></Body></HTML>
S2 Select box selection and anti-selection jquery