Nonsense not to say, directly on the code!
<HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><Scripttype= "Text/javascript"src= "Jquery-3.1.1.min.js"></Script><title>Insert Title here</title></Head><Body><Divstyle= "margin:20px;">Select all:<inputtype= "checkbox"ID= "SelectAll"onclick= "Selects1 ()"> </Div><Divstyle= "width:600px;height:40px;border:1px solid #ccc">Multi Box 1:<inputtype= "checkbox"class= "Check_class">Multi Box 2:<inputtype= "checkbox"class= "Check_class">Multi Box 3:<inputtype= "checkbox"class= "Check_class">Multi Box 4:<inputtype= "checkbox"class= "Check_class">Multi Box 5:<inputtype= "checkbox"class= "Check_class">Multi Box 6:<inputtype= "checkbox"class= "Check_class"></Div><BR><Scripttype= "Text/javascript">/** Method 1 works on both the computer and the local computer. * Method 2 works on the computer only one function, that is, check the selection, after the reverse election. Check again and no longer works. The local PC works as normal * may be due to the jquery version issue? The working computer jquery version is the 1.11 series. This is 3.1.1 .*/ //Implementation Method 1 functionselects1 () {//full selection, reverse selection function varSelectstatus= $('#selectAll'). Is (': Checked'); $('. Check_class'). each (function(){ $( This). Prop ('checked', Selectstatus); }); } //Implementation Method 2 functionselects2 () {//full selection, reverse selection function varSelectstatus= $('#selectAll'). Is (': Checked'); $('. Check_class'). each (function(){ $( This). attr ('checked', Selectstatus); }); } </Script></HTML>
jquery for all-in-select inverse function