• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Text Mouse Rollovers

Styles can be changed dynamically, and that’s where JavaScript comes in. We’ve seen, for example, that you can change the style of text when the mouse rolls over it. Here’s Listing 16-02.html—and now we know how this works (dynamic styles such as this won’t work in Netscape Navigator before version 6.):

<HTML> 
    <HEAD> 
        <TITLE> 
            Text Mouse Rollovers 
        </TITLE> 
    </HEAD> 

    <BODY> 
        <CENTER> 
            <H1> 
                Text Mouse Rollovers 
            </H1> 
            <SPAN ONMOUSEOVER="this.style.fontSize='48'"
					ONMOUSEOUT="this.style.fontSize='12'"
					STYLE="fontSize:36">
					This text gets big when the mouse is over it.
					</SPAN> 
        </CENTER> 
    </BODY> 
</HTML> 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint