event.button实例分析
0
Default
.
No
button
is
pressed
.
没有按下返回值是0
1
Left
button
is
pressed
.
按下左键返回值是1
2
Right
button
is
pressed
.
按下右键返回值是2
3
Left
and
right
buttons
are
both
pressed
.
左键右键同时按下返回值是3
4
Middle
button
is
pressed
.
按下中间建(滚轮)返回值是4
5
Left
and
middle
buttons
both
are
pressed
.
左键中间建(滚轮)同时按下返回值是5
6
Right
and
middle
buttons
are
both
pressed
.
右键中间建(滚轮)同时按下返回值是6
7
All
three
buttons
are
pressed
.
三个键同时按下返回值是7
在
IE
里
面
没
有
按
键
动
作
的
时
候
window
.
event
.
button
=
0
左
键
是
window
.
event
.
button
=
1
中
键
是
window
.
event
.
button
=
4
右
键
是
window
.
event
.
button
=
2
在
Firefox
里
面
没
有
按
键
动
作
的
时
候
event
.
button
=
0
左
键
是
event
.
button
=
0
中
键
是
event
.
button
=
1
右
键
是
event
.
button
=
2