|Property/method value type:||Boolean primitive|
|HTML syntax:||<A onClick="..."> <AREA onClick="..."> <HTMLTag onClick="..."> <INPUT onClick="...">|
|Argument list:||aHandler||A reference to a function object to handle the event|
|Supported by objects:||A, ACRONYM, ADDRESS, Anchor, APPLET, AREA, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, Checkbox, CITE, CODE, DD, DEL, DFN, DIR, DIV, DL, Document, DT, EM, FIELDSET, FileUpload, FONT, FORM, H1, HR, I, IMG, Input, INS, KBD, LABEL, LEGEND, LI, LISTING, MAP, MARQUEE, MENU, OBJECT, OL, P, Password, PLAINTEXT, PRE, Q, RadioButton, ResetButton, S, SAMP, Select, SMALL, SPAN, STRIKE, STRONG, SUB, SubmitButton, SUP, TABLE, TBODY, TD, TEXTAREA, TextCell, TFOOT, TH, THEAD, TR, TT, U, UL, Url, VAR|
This event applies to anchors, reset buttons, and submit buttons. A false return value inhibits the browser from taking any default actions once your handler is completed.
Netscape indicates which mouse button was pressed in the which property of the Event object that is passed as an argument to the event handler function. MSIE makes the value available in the button property of the Event object referenced by the window.event property.
DOM level 2 refers to this as a DOMActivate event, which employs event bubbling for its propagation and can be canceled. The context info provides detail about whether its was a single or double click.
DOM level 2 also classifies this as a MouseEvent and specifies that it must follow a matching pair of mousedown and mouseup events without any intervening mouse movement. As a MouseEvent it uses bubbling propagation and can be canceled.
When you add an onClick handler to an <A> tag object, MSIE and Netscape execute the click in the same way but modify the browser history differently.
An onClick event will also generate an onMouseDown event and an onMouseUp event. The onClick will not be triggered until the onMouseUp event. There is no guarantee that the onClick event will arrive after the onMouseUp event although that is the logical order.
|See also:||Button object, BUTTON object, Checkbox object, Element object, Element.click(), Event, Event handler, Event model, Event names, Event object, Event.button, Event.returnValue, Event.which, Handler, Input.click(), Mouse events, MouseEvent object, RadioButton object, ResetButton object, Semantic event, SubmitButton object, UIEvent object|