<script type="text/javascript" src="http://fw.qq.com/ipaddress" charset="gb2312"></script>
<script type="text/javascript">
alert(IPData[2]+" "+IPData[3])
</script>
<script type="text/javascript">
alert(IPData[2]+" "+IPData[3])
</script>
如果在utf-8编码的页面引用,会产生乱码,解决办法就是加上 charset="gb2312"