<title>IP查询查询</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script language="JavaScript">
<!--
function checkIP()
{
	var ipArray,ip,j;
	ip = document.ipform.ip.value;
	
	if(/[A-Za-z_-]/.test(ip)){
		if(!/^([\w-]+\.)+((com)|(net)|(org)|(gov\.cn)|(info)|(cc)|(com\.cn)|(net\.cn)|(org\.cn)|(name)|(biz)|(tv)|(cn))$/.test(ip)){
			alert("不是正确的域名");
			document.ipform.ip.focus();
			return false;
		}
	}
	else{
		ipArray = ip.split(".");
		j = ipArray.length
		if(j!=4)
		{
			alert("不是正确的IP");
			document.ipform.ip.focus();
			return false;
		}

		for(var i=0;i<4;i++) { if(ipArray[i].length==0 || ipArray[i]>255)
			{
				alert("不是正确的IP");
				document.ipform.ip.focus();
				return false;
			}
		}
	}
}
//-->
</script>
<table style="BORDER-COLLAPSE: collapse" bordercolor="#799AE1" cellpadding="4" width="520" border="1">
  <tbody>
  <tr>
    <td class="tdc1" align="center" bgcolor="#799AE1" colspan="2" height="24"><font color="#FFFFFF" style="font-size:14px">IP地址查询查询</font></td>
  </tr>
<form method="POST" action="http://www.ip138.com/ips.asp" name="ipform">
<tr><td align="center">IP地址：<input name="ip" type="text" value="<%=Request("ip")%>" size="16" /> 
<input type="submit" value="查询" /><input type="hidden" name="action" value="2" />
</td></tr></form></tbody></table>