<html>
<body onmousedown="show(event)">
<script type="text/javascript">
function show(event){
alert(event.button)
}
</script>
</body>
</html>
说明:
event.button值说明:
Integer that specifies or receives one of the following values.
0 Default. No button is pressed.
1 Left button is pressed.
2 Right button is pressed.
3 Left and right buttons are both pressed.
4 Middle button is pressed.
5 Left and middle buttons both are pressed.
6 Right and middle buttons are both pressed.
7 All three buttons are pressed.