阅读背景:

如何在IE中按下鼠标左键时检测鼠标右键?

来源:互联网 

I have the following:

我有以下内容:

<html>
<body oncontextmenu="return false;">
<script src="jquery-1.3.2.min.js"></script>
<script>
$(document).ready(function()
{
    $(document).mousedown(function(e)
    {
        if (e.button == 2) //right click
        {
            document.body.style.backgroundColor = "green";
        }
        else //left click
        {
            document.body.style.backgroundColor = "blue";
        }
    });
});
</script>
</body>
</html>
<html>
<body 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: