js?峰?瀹㈡?風??????瀹?ip,?跺????杩?ip?闆???ヨВ?????ㄧ????浠?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>JavaScript?峰??瀹㈡?風??IP[?╃?ㄦ?版氮?ュ??</title>
</head>
<body>
<script type="text/javascript" src="http://counter.sina.com.cn/ip/" charset="gb2312"></script> <!--?峰???ュ?f?版??锛?娉ㄦ??charset -->
<script type="text/javascript">
document.writeln("IP?闆??锛?"+ILData[0]+"<br />"); //杈??烘?ュ?f?版??涓???IP?闆??
document.writeln("?闆??绫誨??锛?"+ILData[1]+"<br />"); //杈??烘?ュ?f?版??涓???IP?闆????绫誨??
document.writeln("?闆??绫誨??锛?"+ILData[2]+"<br />"); //杈??烘?ュ?f?版??涓???IP?闆??????甯?
document.writeln("?闆??绫誨??锛?"+ILData[3]+"<br />"); //杈??烘?ュ?f?版??涓???IP?闆????
document.writeln("?闆??绫誨??锛?"+ILData[4]+"<br />"); //杈??烘?ュ?f?版??涓???IP?闆????杩??ュ??
</script>
</body>
</html>
<div id="sina_ip_info"></div>
<script type="text/javascript" src="http://counter.sina.com.cn/ip/" charset="gb2312"></script> /*?峰?ILData[0]*/
<script src="http://code.jquery.com/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
var uip =ILData[0];
$.getScript('http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js&ip='+uip, function(_result){
var ipData = ""; //??濮???淇?瀛???瀹瑰????
if (remote_ip_info.ret == '1'){
ipData += "IP 璇??淇℃??锛?<br>";
ipData += "IP锛?" + uip + "<br>";
ipData += "?藉?訛?" + remote_ip_info.country + "<br>";
ipData += "??浠斤?" + remote_ip_info.province + "<br>";
ipData += "??甯?锛?" + remote_ip_info.city + "<br>";
ipData += "?猴?" + remote_ip_info.district + "<br>";
ipData += "ISP锛?" + remote_ip_info.isp + "<br>";
ipData += "绫誨??锛?" + remote_ip_info.type + "<br>";
ipData += "?朵?锛?" + remote_ip_info.desc + "<br>";
$("#sina_ip_info").html(ipData); //?劇ず澶????????版??
} else {
alert('??璇?', '娌℃???懼?闆?歸???? IP ?闆??淇℃??锛?');
}
});
</script>