Check and uncheck a checkbox : CheckBox : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » CheckBox »

 

Check and uncheck a checkbox




<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>



           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» CheckBox