The onMouseOver- property
In the online version of this document you can see a link where you can move your mousepointer over. This causes a text to be written to the statusbar. You can combine this with other JavaScript functions as well. Another example shows that you can call an alert- message box when moving over a link. Here is the code for the first example:
The only thing you have to do is to add the onMouseOver- property to your - tag. The 'window.status' will allow you to write things to the statusbar of your web-browser. As you can see you have to alter with the quotes. You cannot use " all the time, because otherwise JavaScript is not able to identify the string you want to print to the statusbar. After the string you have to write ;return true.
The second example uses JavaScript by calling the alert- function. Here is the code:
This is quite easy. It uses the onMouseOver- method and the function hello() is called when this event occurs.
No comments:
Post a Comment