jQuery checkbox event handling

后端 未结 7 742
借酒劲吻你
借酒劲吻你 2020-11-29 16:30

I have the following:

相关标签:
7条回答
  • 2020-11-29 17:17
    $('#myform :checkbox').change(function() {
        // this will contain a reference to the checkbox   
        if (this.checked) {
            // the checkbox is now checked 
        } else {
            // the checkbox is now no longer checked
        }
    });
    
    0 讨论(0)
提交回复
热议问题