我有一个页面" jsonencode.php"包含编码数组
[["Easth1","North1","A","URL1"],["Easth2","North2","B","URL2"]]
我知道我可以将html加载到div中:
$("#div").load("jsonencode.php");
但我想做的是将数组加载到变量中:
var a = load("jsonencode.php");
答案 0 :(得分:0)
jQuery.getJSON('jsonencode.php', function(obj) {
//obj not holds your parsed JSON as a JS object
});