Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

Displaying a message in the status bar

This example describes how to get a message to appear in the status bar of the browser window when you move the mouse over a link. You don't need the <script> tag for this one.

You can use two script event attributes: onmouseover and onmouseout. The onmouseover script executes when you move the mouse onto the link and the onmouseout script executes when you move the mouse away.

To create a link that puts a message in the status bar, use:

<a href=”offers.htm” onmouseover=”window.status =’Unbelievable 
offer. Have a look!’; return true;” onmouseout=”window status= 
‘ ‘; return true;”

The status bar looks like:

The HTML needs to be on a single line on the page or it won’t work.