1.if(event.button==2){}2.你不可能同时单击的,总有先后。

解决方案 »

  1.   

    event.button==3表示左右键同时按下0 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. 
      

  2.   

    可能是我用错了,我是用onclick来触发的,左键event.button=0 右键无反应
    那我该用什么来触发才能取到值,onmousedown?
      

  3.   

    <script>
    function document.onmousedown(){
    alert(event.button);
    }
    </script>