Change/Get check state of CheckBox

前端 未结 11 961
别跟我提以往
别跟我提以往 2020-12-03 02:30

I just want to get/change value of CheckBox with JavaScript. Not that I cannot use jQuery for this. I\'ve tried something like this but it won\'t work.

JavaScript fu

11条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 02:47

    This will be useful

    $("input[type=checkbox]").change((e)=>{ 
      console.log(e.target.checked);
    });
    

提交回复
热议问题