Netscape uses a completely different means of determining which mouse button or keyboard key was pressed. It also detects alt, control and shift modifier keys using a different technique to that used by MSIE.
The mouse buttons don't even correspond to the same mapping as MSIE. Here are the mouse button value passed in the which property:
1 - The left button
2 - The right button in a two button mouse
2 - The middle button in a three button mouse
3 - The right button in a three button mouse
If the event is a keyboard triggered event, the which property will contain the ASCII character value of the keyboard key that was pressed. Note that it is the ASCII value and not the Unicode value although the distinction is very subtle.
DOM level 2 event handling replaces this property of the Event object with the MouseEvent.button property.
This is not supported by MSIE, which uses the button and keyCode properties to return mouse button values and key codes separately from one another.
Prev | Home | Next |
Event.type | Up | Event.width |
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. |