Call 'click()' to triger event : CheckBox : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » CheckBox »

 

Call 'click()' to triger event



    
<html>
<body>
<script language="JavaScript">
    function function1() {
        myCheckbox.focus()
        myCheckbox.click();
    }
</script>
<input type="checkbox" id="myCheckbox" value="checkbox">
<button onclick="function1();">Click the checkbox</button>
</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