把如下程式碼加入到<head>區域中
<script LANGUAGE="Javascript">
netscape = (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>
把如下程式碼加入到<head>區域中
<script LANGUAGE="Javascript">
netscape = (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>