Change element cursor via CSS style cursor - Javascript CSS Style Property

Javascript examples for CSS Style Property:cursor

Description

Change element cursor via CSS style cursor

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() {/*  w ww .  j av  a  2  s  .c  om*/
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