Although this property is named onevent, there is actually no such property. All event handlers for Input objects have names that begin with the 'on' prefix. The name then describes the event.
The properties contain references to a handler function that is invoked for each kind of event. Events that are not handled are represented by a null value in the corresponding handler property.
The event model is different for each browser, and the way that events are propagated is different as well. As long as you define only a single handler and keep the event trapping simple, both browsers behave similarly enough that you will be able to realize a portable script implementation.
Note that the event model undergoes a significant revision with the introduction of DOM level 2 capabilities which are currently provided in the new Netscape 6.0 browser.
Refer to the topic describing each kind of Input object sub-class for details of the events that this can handle.
Prev | Home | Next |
Input.name | Up | Input.readOnly |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |