选定以及不选定 checkbox
- <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>