Getting value of HTML Checkbox from onclick/onchange events
<html><head> </head> <body> <div style="display: none;" id="container">Check Box is Checked</div> <br><br> <label> <input id="mycheckbox" onclick="myChange()" type="checkbox"> </label> <script> function myChange(){ var temp = document.getElementById('mycheckbox'); document.getElementById('container').style.display = temp.checked ? 'block' : 'none'; }; </script> </body></html>