Add event handler to onmouseover action - Javascript DOM Event

Javascript examples for DOM Event:onmouseout

Description

Add event handler to onmouseover action

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {//from w ww.  j a  v a  2 s  .co m
var p = document.createElement("p");
p.innerHTML = 'Hello World';
p.onmouseover = function() {
    this.style.cursor = 'pointer';
};
document.body.appendChild(p);
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials