Top web site - 791Chapter 25Event ObjectsMethodsinitEvent( eventType , bubblesFlag, cancelableFlag) initKeyEvent( eventType , bubblesFlag, cancelableFlag,

791Chapter 25Event ObjectsMethodsinitEvent( eventType , bubblesFlag, cancelableFlag) initKeyEvent( eventType , bubblesFlag, cancelableFlag, view, ctrlKeyFlag, altKeyFlag, shiftKeyFlag, metaKeyFlag, keyCode, charCode) initMouseEvent( eventType , bubblesFlag, cancelableFlag, view, detailVal, screenX, screenY, clientX, clientY, ctrlKeyFlag, altKeyFlag, shiftKeyFlag, metaKeyFlag, buttonCode, relatedTargetNodeRef) initMutationEvent( eventType , bubblesFlag, cancelableFlag, relatedNodeRef, prevValue, newValue, attrName, attrChangeCode) initUIEvent( eventType , bubblesFlag, cancelableFlag, view, detailVal) Returns:Nothing. Compatibility:WinIE-, MacIE-, NN6+, Moz1+, Safari1+ The W3C DOM eventobject initialization methods provide a means of initializing a newlycreated event with a complete set of property values associated with that particular event. The parameters to each of the initialization methods vary according to the type of eventbeing initialized. However, all of the initialization methods share the first three parameters: eventType, bubblesFlag, and cancelableFlag. The eventTypeparameter is a string identi- fier for the event s type, such as mousedown or keypress . The bubblesFlagparameteris a Boolean value that specifies whether the event s default propagation behavior is tobubble (true) or not (false). The cancelableFlagparameter is also a Boolean value, andits job is to specify if the event s default action may be prevented with a call to thepreventDefault()method (true) or not (false). A few of the methods also include viewand detailValparameters, which correspond to thewindow or frame in which the event occurred and the integer code of detail data associatedwith the event, respectively. Additional parameters are specified for some of the methods, and are unique to the event being initialized. You don t have to use the more detailed methods if you need a simple event. For example, ifyou want a simple mouseupevent, you can initialize a generic event with initEvent(), anddispatch the event to the desired element, without having to fill in all of the coordinate, but- ton, and other parameters of the initMouseEvent()method: var evt = document.createEvent( MouseEvents ); evt.initEvent( mouseup , true, true); document.getElementById( myButton ).dispatchEvent(evt); For more details about W3C DOM event types and the values expected for each of the morecomplex initialization methods, visit http://www.w3.org/TR/DOM-Level-2-Events/ events.html#Events-eventgroupings. Related Items:document.createEvent()method. (NN6/Moz/Safari) eventObject.initEvent()
We recommend high quality webhost to host and run your jsp application: christian web host services.

Leave a Reply