|
![]() |
|||
|
Here are a few little tricks you can use to spruce up the look of your web pages. Be aware that most of these examples will not work in Netscape 2.0 or lower. Anyone who accesses your site in an older browser will not experience some of these tricks. Notice: Any tag containing JavaScript MUST be all in one line. If it is broken into several lines, the JavaScript will not work. Status Bar Tricks Have you ever noticed that when you move your mouse pointer over a link, the status bar at the bottom of your browser will display the address of the link? Some links, with the use of JavaScript, can display messages rather than the address. Here's how: Move your mouse over the following links, and notice what is displayed in the status bar:
A JavaScript Link to the Main Page Highlighting Images This is a fancy trick. To have images appear to be highlighted when the mouse moves over it is quite a trick. To begin, get an idea of what image you would like to have highlighted, and create two images; one normal and one highlighted.
These two separate images can be put together to create on highlighted image. Here is the result:
Code:
Examining the code one piece at a time, target="_parent" just assures that
the page linked here will fill the entire browser window and not just that
frame. The onMouseOver tag contains
document.images[5].src='link'. Note the single quotes here. The
number inside the brackets
will change according to what number your image is on the page. If you
count the number of images on this page, starting at "0", you will find
that this image is number 5 on the page. The same occurs for the
onMouseOut tag. Finally, we set the image which initially appears
in that position by using the img src="link" tag. Here, we use
double quotes as we would in a normal image tag.
|
||||
|
||||