我正在尝试解析数组' 浏览器端'来自外部json文件,但它无法正常工作。
需要帮助
<!DOCTYPE html>
<html>
<body>
<h2>Parsing specific array from external file</h2>
<p id="demo"></p>
<script>
$.getJSON('http://www.mybeautiful.net63.net/test/myTutorials-json.js', function(data) {
obj = JSON.parse(data);
for (var i = 0; i < obj.browser-side.length; i++)
{
document.getElementById("demo").innerHTML += obj.browser-side[i].display + " " + obj.browser-side[i].url + ",";
}
});
</script>
</body>
</html>
&#13;