-
<A HREF="somelink.html" onmouseover="alert('your-name')">Link</A>
Note: The single quotes are nested inside double quotes.
-
<A HREF="somelink.html" onmouseover="document.bgColor='#FF0000'">Change Background color to red</A>
Note: bgColor is a property of the document object since it's the document object that controls the background color of the page. The event handler is case insensitive since its a part of the HTML. However, the code is exclusively JavaScript's domain and is sensitive to case. Thus, bgcolor will not work (and probably throw error under some browsers). The correct usage is bgColor with the capital C.
-
<A HREF="somelink.html" onmouseover="document.bgColor='#FF0000'">Change Background color to red</A>
<A HREF="somelink.html" onmouseover="document.bgColor='#FFFFEE'">Change Background color to pale yellow (original color)</A>