嘗試此鏈接:http://humberinteractive.com/2013/api/index.php?fname=keoJquery.ajax()拋出錯誤
你可以看到,它以$ _GET [「FNAME」],並打印出我需要的內容。
我想:
$.ajax({
type: 'GET',
url: 'http://humberinteractive.com/2013/api/index.php?fname=keo',
success: function(data) {
alert(data);
}
});
但它不工作...
的jsfiddle:http://jsfiddle.net/3V8VP/
幫助幫助
您以無用格式返回數據。你應該返回json或xml。 –
什麼不起作用? –
[相同來源政策](http://en.wikipedia.org/wiki/Same_origin_policy)? – Musa