通过循环就可以将json里的值全部获取了;var json = {'name':'xxxxx', 'age':27};for(var name in json){document.write(json[name]);}