151Chapter 15 .Generic HTML Element Objects Example (with (Ecommerce web host)

151Chapter 15 .Generic HTML Element Objects Example (with Listings 15-19a and 15-19b) on the CD-ROM Related Items: readyState property; removeBehavior() method; behaviors (Chapter 48). addEventListener( eventType , listenerFunc, useCapture) removeEventListener( eventType , listenerFunc, useCapture) Returns: Nothing. NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility The W3C DOM s event mechanism accommodates both event bubbling and trickling (see Chapter 29). While the new mechanism supports the long-standing notion of binding an event to an element by way of HTML attributes (for example, the old onClick event handler), it encourages binding events by registering an event listener with an element. (In browsers that support the W3C event model, other ways of binding events such as event handler attributes are internally converted to registered events.) To tell the DOM that an element should listen for a particular kind of event, use the addEventListener()method on the element object. The method requires three parameters. The first is a string version of the event type for which the element should listen. Event type strings do not include the well-used on prefix of event handlers. Instead, the names consist only of the event and are usually in all lowercase (except for some special system-wide events preceded by DOM). Table 15-7 shows all the events recognized by the W3C DOM specification (although NN6 may not implement them all). Table 15-7 W3C DOM Event Listener Types abort error blur focus change load click mousedown DOMActivate mousemove Continued On the CD-ROM elementObject.addEventListener()
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Leave a Reply