In our last article we left off with the OnKeyUp function, which is triggered when a user releases a key on the keyboard. We will continue discussing the various JavaScript events in this article, and hopefully finish them in the next tutorial. So grab yourself some coffee and let’s get to work.
OnLoad and OnMouse JavaScript Events - OnMouseOver (Page 5 of 6 )
The OnMouseOver event is triggered when a user moves their mouse over a specific element. In the code below, I intermingled use of the OnMouseOver and OnMouseOut events. I start off with a text box with the default value "james." If the user moves their mouse over the box, the value is uppercased and a pop-up box appears telling the user that this has happened. Next, if the user moves their mouse over the Come Here button, a pop-up appears saying: "You came to me!" If the user drags the mouse away from the box, they will get another pop-up alert begging: "No please do not leave me!"