Handle mouse out and over event for <div> - Javascript DOM Event

Javascript examples for DOM Event:onmouseout

Description

Handle mouse out and over event for <div>

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <div id="harv1244" onmouseover="lookdown(this)" onmouseout="lookup(this,'apples')">
          dummy //from w w w.  j  a  v  a2  s  .  c  o m
      </div> 
      <script type="text/javascript">
function lookdown(ele) {
    ele.innerHTML="See details below";
}
function lookup(ele,crop) {
    ele.innerHTML=crop;
}

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

Related Tutorials