Catch checked change event of a checkbox

后端 未结 9 1940
盖世英雄少女心
盖世英雄少女心 2020-12-12 17:09

How do I to catch check/uncheck event of with jQuery?

9条回答
  •  佛祖请我去吃肉
    2020-12-12 17:35

    The click will affect a label if we have one attached to the input checkbox?

    I think that is better to use the .change() function

    
    
    $("#something").change( function(){
      alert("state changed");
    });
    

提交回复
热议问题