要完成此效果把如下代码加入到<head>区域中<SCRIPT LANGUAGE="JavaScript"><!-- Beginnetscape = (navigator.appName.indexOf("Netscape") != -1);version4 = (navigator.appVersion.indexOf("4.") != -1);if (netscape && version4) { ip = "" java.net.InetAddress.getLocalHost().getHostAddress();if (ip.indexOf("235.12") >= -1) // 这是想要禁止访问的IP例如: 235.12.xxx.xxx { alert("You are not permitted to access this site."); history.go(-1); }}// End --></script>
下载页面保护 可以禁止某些IP的访问用户还喜欢


评论