Display Message on MouseOver

The sample code displays a message on a mouseover event.

For example, when keep your mouse pointer over the link, a "hello world" message is displayed.


<html>
<head>
<script type="text/javascript">
function showValue()
{
var x=document.getElementById("id1")
x.innerHTML = 'Hello World';
}
</script>
</head>
<body>
<h2>Move the mouse over text to see the message.</h2>

<p id="Link1" onmouseover="showValue()">Hello</p>
<div id="id1"></div>
</body>
</html>


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: