//javascript点击页面,判断鼠标左键,右键,中键点击事件

<script language=javascript>
        function click()
        {
            if (event.button == 1)
            {
                alert('left');
            }
            if (event.button == 2)
            {
                alert('right');               
            }
            if(event.button == 4)
            {
                alert('middle');
            }
        }
        document.onmousedown = click;
    </script> 

posted on 2008-06-24 08:57  Dot-Boy  阅读(6537)  评论(0编辑  收藏  举报