如何在JavaScript中从URL获取JSON?此URL返回JSON:{
query: {
count: 1,
created: "2015-12-09T17:12:09Z",
lang: "en-US",
diagnostics: {},
...
}}我试过这个,但它不起作用:responseObj = readJsonFromUrl('http://query.yahooapis.com/v1/publ...');var count = responseObj.query.count;console.log(count) // should be 1如何从此URL的JSON响应中获取JavaScript对象?
添加回答
举报
0/150
提交
取消