checkbox复选框,如何让其勾选时触发一个事件,取消勾选时不触发
<input type="checkbox" onclick="checkboxOnclick(this)" /> <script> function checkboxOnclick(checkbox){ if ( checkbox.checked == true){ //Action for checked }else{ //Action for not checked } } </script>
轉載:https://blog.csdn.net/l_degege/article/details/80265394