禁用右键并自动导航

发布时间:2008-12-19 15:11:59 阅读次数:

-------------------------------------------------------------------------------- 脚本说明: 把如下代码加入区域中 <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>