Previous Example-|-Next Example-|-Return to Chapter Listing

Example 12.5:
onmouseover: An Alert Box on a Link


Point at the link to see a message box, displayed by the onmouseover event handler.

Click right here. Not!


This is the script we used in the HEAD: <SCRIPT LANGUAGE="JavaScript"> <!-- function confirmMove() { if (confirm("Are you sure you want to use this link? I really don't think you should. Well, if you insist, click on OK and I'll take you to the referenced page. Otherwise click on Cancel and leave the link alone!")) { location='12-5a.htm' } } //--> </SCRIPT> This is the link we created: <A HREF="12-5A.HTM" onmouseover="confirmMove()">Click right here. <I>Not!</I></A>
Previous Example-|-Next Example-|-Return to Chapter Listing