根据请求接口求json 小白求大神帮忙啊 json数据ajax 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <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> 代码有错没有啊 XMLHttpRequest cannot load http://ip.taobao.com/service/getIpInfo.php?ip=我的ip. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.这个是控制器报的错 怎么解决啊 求大神 跪求 跨域了,后台做个页面下载那些数据,ajax访问那个页面获取数据 寻找ibatis API下载 监听Iframe的Unload事件 如何用键盘上的“enter”键实现模态框中的“确定”键的功能 关于CSS+Javascript 做菜单的问题? js的正则表达式问题,特简单,但我不懂 目测:目前的最好的Web开发是什么啊 一个关于web打印的问题(scriptx) JScript中将ascii为34转换成ASCII字符用哪个函数啊,也是VB中的chr函数 请问top.location和window.location有什么区别? href是什么的缩写? js 转码问题 jqueryjs比其他的类库更好吗,
<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>