?????????????????????????俴??????Щ???(???????????)???????????IP??????????????.??????????API???????useragent???????????.

 

<html>
<head>
<title>Sherry</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://counter.sina.com.cn/ip/" charset="gb2312"></script>
<script>
document.writeln("IP?????"+ILData[0]+"<br />");           //???????????е?IP???
document.writeln("????????"+ILData[1]+"<br />");         //???????????е?IP?????????
document.writeln("????????"+ILData[2]+"<br />");         //???????????е?IP????????
document.writeln("????????"+ILData[3]+"<br />");         //???????????е?IP?????
document.writeln("????????"+ILData[4]+"<br />");         //???????????е?IP??????????
//document.write(navigator.userAgent + "<br>");
document.write("???????????汾???");
if(navigator.userAgent.indexOf("Windows NT 6.2") > 0){
document.write("Windows 8");
}
else if(navigator.userAgent.indexOf("Windows NT 6.1") > 0){
document.write("Windows 7");
}
else if(navigator.userAgent.indexOf("Windows NT 6.0") > 0){
document.write("Windows Vista");
}
else if(navigator.userAgent.indexOf("Windows NT 5.2") > 0){
document.write("Windows 2003");
}
else if(navigator.userAgent.indexOf("Windows NT 5.1") > 0){
document.write("Windows xp");
}
else if(navigator.userAgent.indexOf("Windows NT 5.0") > 0){
document.write("Windows 2000");
}
</script>
</head>
<body>
</body>
</html>

 ???????: