テストプロジェクト用の公開APIからデータを取得しようとしています。 - 欠落JavaScriptを使用したJsonの解析(ブランクページを表示)
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
$.getJSON(http://api.wmata.com/StationPrediction.svc/json/GetPrediction/A10,A11?api_key=hadtcpbh3w5xjbtyqrzgm88x',
function (json) {
var tr;
for (var i = 0; i < json.length; i++) {
tr = $('<tr/>');
tr.append("<td>" + json[i].userId + "</td>");
tr.append("<td>" + json[i].id + "</td>");
tr.append("<td>" + json[i].title + "</td>");
tr.append("<td>" + json[i].body + "</td>");
$('table').append(tr);
}
});
});
</script>
</body>
</html>
が見えます文字列を開かないでください。私は外に出て、javascriptデバッグツールの使用に関するチュートリアルを探します。 –