禁止使用鼠标右键,如果你点了右键页面就自动跳转到相应链接上
<!-- 要实现此效果需要 1 个步骤: -->
<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->
<script language="Javascript">
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer()
{
if (event.button == 2 | event.button == 3)
{
alert("禁止右键...去yahoo!");
location.replace("http://www.yahoo.com");
}
}
</script>