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