$.getJSON是异步的,所以您应该这样做:
$.getJSON("test.json", function(json) { console.log(json); // this will show the info it in firebug console});
$.getJSON是异步的,所以您应该这样做:
$.getJSON("test.json", function(json) { console.log(json); // this will show the info it in firebug console});