211Chapter 15 .Generic HTML Element (Web hosting providers) Objects onMouseDown onMouseUp
211Chapter 15 .Generic HTML Element Objects onMouseDown onMouseUp NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility The onMouseDown event handler fires when the user presses any button of a mouse. The onMouseUp event handler fires when the user releases the mouse button, provided the object receiving the event also received an onMouseDownevent. When a user performs a typical click of the mouse button atop an object, mouse events occur in the following sequence: onMouseDown, onMouseUp, onClick. But if the user presses the mouse atop an object and then slides the cursor away from the object, only the onMouseDownevent fires. In NN4, these two mouse events were limited to button, radio button, checkbox, link, and areaobjects. These events enable authors and designers to add more application-like behavior to images that act as action or icon buttons. If you notice the way most buttons work, the appearance of the button changes while you press the mouse button and reverts to its original style when you release the mouse button (or you drag the cursor out of the button). These events enable you to emulate that behavior. The event object created with every mouse button action has a property that reveals which mouse button the user pressed. NN4 s event model calls that property the which property. IE4+ and NN6 call it the button property (but with different values for the buttons). It is most reliable to test for the mouse button number on either the onMouseDown or onMouseUpevent, rather than on onClick. The onClick event object does not always contain the button information. Example (with Listing 15-42) on the CD-ROM Related Item: onClick event handler. onMouseEnter onMouseLeave NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility Two event handlers that are new with IE5.5 are onMouseEnterand onMouseLeave. Both event handlers operate just like the onMouseOver and onMouseOut event handlers, respectively. Microsoft simply offers an alternate terminology. The old and new events continue to fire in IE5.5. The old ones fire just before the new ones for each act of moving the cursor atop, and exiting from atop, the object. If you are scripting exclusively for IE5.5+, then you should use the new terminology; otherwise, stay with the older versions. On the CD-ROM elementObject.onMouseEnter
We would like to recommend you tested and proved virtual web hosting services, which you will surely find to be of great quality.