Javascript 如何从url解析json?

Javascript 如何从url解析json?,javascript,json,parsing,cordova,Javascript,Json,Parsing,Cordova,大家好,我正在开发一个应用程序,我需要使用java脚本解析json来解析json。我用谷歌搜索了很多次,我试了2到3个小时,但没有得到任何我正在寻找的正确答案。下面的代码是我正在尝试的 我的代码是: <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>

大家好,我正在开发一个应用程序,我需要使用java脚本解析json来解析json。我用谷歌搜索了很多次,我试了2到3个小时,但没有得到任何我正在寻找的正确答案。下面的代码是我正在尝试的

我的代码是:

<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"> </script>
<script>

$(function() {

var entries = [];
var dmJSON = "https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20xml%20where%20url%3D%27http%3A%2F%2Fcallme.myshareus.nl%2FAPI%2FgetGroups.php%3FAPIkey%3Dte7gRRT8Ut2VYW%26InitiatorId%3D0000001%26AccountId%3D00550%26Role%3D1%0A%27&format=json&diagnostics=true?callback=?";
$.getJSON( dmJSON, function(data) {
   $.each(data.entity, function(i, f) {
      var tblRow = "<tr>" + "<td>" + f.content + "</td>" +  "</tr>"
       $(tblRow).appendTo("#entrydata tbody");
 });

});
});
</script>
</head>

<body>

<div class="wrapper">
<div class="profile">
<table id= "entrydata" border="1">
<thead>
        <th>ID</th>
        <th>Name</th>

    </thead>
  <tbody>

   </tbody>
</table>

</div>
</div>

</body>

</html>
我没有得到任何回应

在URL的末尾:

?callback=?
应该是:

&callback=?

在URL中?用于将参数与路径名分开,&用于将参数彼此分开。

谢谢您回答我的问题,但我用&callback=?但仍然没有得到回应。