Javascript examples for DOM:Element innerHTML
Passing a string to innerHTML
<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 ww w. j a v a 2s . co m </div> <script type="text/javascript"> function lookdown(ele) { ele.innerHTML="See details below"; } function lookup(ele,crop) { ele.innerHTML=crop; } </script> </body> </html>