<html>
<head>
<script type="text/javascript">
function BtnPress(event)
{
var btnNum = event.button;
if (btnNum==2)
{
alert("您点击了鼠标右键!")
}
else if(btnNum==1)
{
alert("您点击了鼠标左键!")
}
else if(btnNum==4)
{
alert("您点击了鼠标中键!");
}
else
{
alert("您点击了" + btnNum+ "号键!");
}
}
</script>
</head>
<body onmousedown="BtnPress(event)">
<p>请在这里随意点1下鼠标键</p>
</body>
</html>