I know that onMouseOver becomes an event when the mouse is passed over a link. (BTW, it can be used in other places, not just over links.) Likewise, onClick would be an event where the user clicked the mouse button. So, one would think that the script should be just as successful when using onClick Event Handler. Below is an example of the code for it, using the alert method with it:
HTML file: | Displayed by browser: |
---|---|
<body>
<A HREF="http://www.htmlgoodies.com" target="_blank" onClick="alert('You are off!');">Click Here</A> </body> |
Click Here |