Example 1 :
Popping an alert on completion of data entry in a field or pressing a button.
|
USES : onblur and alert |
|
|
Example 2 :
Validating data entered in an input field
|
USES : onblur, alert and indexOf |
You could extend the emailcheck function by checking for the '.' (dot) also.
|
|
Example 3 :
Displaying messages in the Statusbar
|
USES : onMouseOver and onMouseOut |
|
It usually makes good sense to explain what your links are all about check this out. Move your mouse over this and watch the statusbar. The next link is even better
When u move the mouse away from the link the message in the status bar dissappears. Well .... wasn't that cool. The onMouseover event occurs when the cursor goes over the link and that causes the function written out there to execute. which is
window.status='yippeeeeeee....' ----> this writes the text to the statusbar. In the second link as the mouse moves away from the link the onMouseOut event occurs and the function written out there clears the statusbar.
|
- More stuff on