我有外部的json URL。在外部服務器訪問JSON
http://kun6858.iptime.org:8080/apps/list/?app_mb_no=9
我訪問此JSON使用jQuery $ .getJSON(..)
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<script>
$.getJSON(
"http://kun6858.iptime.org:8080/apps/list/?jsoncallback=?",
{
app_mb_no : 9
},
function(data) {
console.log(data);
}
);
</script>
</body>
</html>
但使用上面的源代碼我無法訪問JSON。
我不知道如何訪問外部服務器的JSON。 我的源有問題嗎?或JSON?
供大家參考,這是屏幕截圖..
這是jQuery的AJAX的祕密.. http://stackoverflow.com/questions/7936610/json-uncaught-syntaxerror-unexpected-token –