关于跨域的ajax

$.getJSON("http://query.yahooapis.com/v1/public/yql?callback=?", {   

				    q: "select * from json where url='http://baidu.kuaidi100.com/query?type=tiantian&postid=886511927358&id=4'",   

				    format: "json"   

				}, function(data) {   

				    var $content = $("#content")   

				    if (data.query.results) {  

				        var result = JSON.stringify(data.query.results);

				        alert(result);

				        $content.text(result);  

				        var obj = eval('('+result+')');

				        alert(obj.json.message);

				    }  

				});  

  

你可能感兴趣的:(Ajax)