javascript document createEventObject( )
createEventObject( ) | Firefox/Netscape/NN n/a IE 5.5(Win) Chrome/Safari/DOM n/a |
createEventObject([existingEventObject]) |
|
Generates in memory an instance of an empty IE DOM event object. After the generic event is created, its properties can be stuffed with pertinent values to help the event be processed. Then the event acts as a parameter to an element's fireEvent( ) method, at which point the event type is associated with the event. The following sequence creates a mousedown event and sends it to an element: var evt = document.createEventObject( ); document.getElementById("myElement").fireEvent("onmousedown", evt); |
|
You can also use an existing event object as a model for a script-generated event. Pass the current event object as a parameter to the createEventObject( ) method, and modify the properties of the new object as you see fit. |
|
Parameters | |
|
|
Returned Value | |
event object reference. |
Powered by Linode.