<html> <head> <script type="text/javascript"> function check() { var x=document.forms.myForm x[0].checked=true } function uncheck() { var x=document.forms.myForm x[0].checked=false } </script> </head> <body> <form name="myForm"> <input type="checkbox" value="on"> <input type="button" onclick="check()" value="Check Checkbox"> <input type="button" onclick="uncheck()" value="Uncheck Checkbox"> </form> </body> </html>
Edit the text above, and click on the button to see the result.
Copyright © 2007-2008, Www.JavaBasics.We.Bs All rights reserved.