<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