87,910
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
// new Ajax.Request("http://ip.taobao.com/service/getIpInfo.php?ip=我的ip", {
// method: "get",
// onSuccess: function(data) {
// var json = data.responseText.evalJSON();
// document.write(json.code);
// }
// });
// $.getJSON('http://ip.taobao.com/service/getIpInfo.php?ip=我的ip', function(data) {
// document.write(data['data.ip']);
// });
$.ajax({
type : "GET",
url : "http://ip.taobao.com/service/getIpInfo.php?ip=我的ip",
dataType : "json",
success : function (data) {
var json=eval("("+data+")");
document.write(json['code']);
}
});
</script>
</head>
<body>
</body>
</html>