W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function check() { document.getElementById("myCheck").checked=true } function uncheck() { document.getElementById("myCheck").checked=false } </script> </head> <body> <form> <input type="checkbox" id="myCheck" /> <input type="button" onclick="check()" value="选定复选框" /> <input type="button" onclick="uncheck()" value="取消选定复选框" /> </form> </body> </html>