fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script> function check(){ document.getElementById("check1").checked=true } function uncheck(){ document.getElementById("check1").checked=false } </script> </head> <body> <form> <input type="checkbox" id="check1">你喜欢夏天吗? </form> <button onclick="check()">确认选择框</button> <button onclick="uncheck()">不确认选择框</button> </body> </html>
运行结果