复选框onclick改变value值
<input onclick= " " type= "checkbox " value= "false " name= "top " />
想用onclick事件来循环改变value值,checked的时候value=true否则value=false
语句应该怎么写
------解决方案-------------------- <input onclick= "this.value=this.checked? 'true ': 'false ' " type= "checkbox " value= "false " name= "top " >