<script type="text/javascript"> window.onload = function(){ document.getElementById("input").onchange = function(){ if(this.checked) alert(this.checked); }; }; </script> <input type="checkbox" id="input" value="" />