Javascript Reference
Categories: event

javascript event button

@March 15, 2008, 1:22 a.m.
buttonFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2

Read-only

Inidicates which mouse button was pressed to trigger the mouse event. Be aware that the typical Macintosh has only a one-button mouse. Also, if you want to intercept the right-click context menu in IE/Windows, use the oncontextmenu event handler.

 

A significant discrepancy exists among DOM specifications and implementations with respect to the numbers returned for this property. The W3C DOM, as implemented in Netscape 6, specifies a value of zero to indicate the left (primary) button. IE for Windows supports additional values for mouse button combinations.

 
Example
 
if (evt.button == 2) {
    // handle event for right button
}
 
Value

Integer value according to the following table.

 
Button(s)IENN 6W3C DOM
No button0nullnull
Left (primary)100
Middle411
Right222
Left + Right3n/an/a
Left + Middle5n/an/a
Right + Middle6n/an/a
Left + Middle + Right7n/an/a
 
Default

0

г‚·гѓ«гѓ‡гѓЉгѓ•г‚Јгѓ« гЃЇйЂљиІ©гЃ§гЃ®иіј - <a href="https://jpedpharm.com/tadalafil/">г‚·г‚ўгѓЄг‚№ гЃЉгЃ™гЃ™г‚Ѓ</a> г‚їгѓЂгѓ©гѓ•г‚Јгѓ« йЈІгЃїж–№
Dvetnp - 31 hours
プレドニン おすすめ - <a href="https://jpaonlinep.com/jamoxicillin/">アモキシル - 500mg</a> アジスロマイシン どこで買える
Snoktn - 55 hours
buy cabergoline 0.25mg generic - <a href="https://adostilin.com/">cabergoline 0.5mg drug</a> cheap alesse sale
Zwnssa - 1 weeks

Powered by Linode.