Javascript DOM HTML Input Checkbox handle mouse over event

Description

Javascript DOM HTML Input Checkbox handle mouse over event

View in separate window

<!DOCTYPE html>
<html>
<body>
<form>
  <input type="checkbox" 
         id="myCheck" 
         onmouseover="myFunction()" 
         onclick="display()">
</form>/*from   w w w.  j  a v a  2  s . com*/

<p id="demo"></p>

<script>
function display() {
  document.getElementById("demo").innerHTML = "click event occured";
}

function myFunction() {
  document.getElementById("myCheck").click();
}
</script>


</body>
</html>



PreviousNext

Related