About jQuery checkbox

About checkbox:

$("#checkall").click(function () {
     // this Fully selected check boxVar userids = this.checked;If (this.checked = = false) {$("input[name=cheCkbtn] "".Each (function () {")This.checked = userids;//do something       })}Else {/ / get the check box of name=checkbtn to traverse the output check box.$("input[name=checkbtn]").EaCH (function () {//do somethingThis.checked = userids;};}});
About monitoring checkbox status change events:
I've tried some online writing, such as change events, bind click events and so on, but in the input add onclick events, through onclick (this) can get the control of this, to judge the checIs Kbox selected?
As follows:
function clickme(aval) {
 
           if ($(aval).prop("checked") == true) {
 
            //do something
 
           }
           else {
               //do something
           }
 
       }


Leave a Reply

Your email address will not be published. Required fields are marked *