下面的例子可对一个单选按钮进行选定和不选定:
</>code
- <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" />
- <input type="button" onclick="uncheck()" value="Uncheck" />
- </form>
- </body>
- </html>
如对本文有疑问,请提交到交流论坛,广大热心网友会为你解答!! 点击进入论坛
Powered by 365建站网 RSS地图 HTML地图
copyright © 2013-2024 版权所有 鄂ICP备17013400号