下载 json2.js
https://github.com/douglascrockford/JSON-js然后
var info = JSON.parse(xmlhttp.responseText);
就可以了

解决方案 »

  1.   

    感谢孟子E章,用 var info = JSON.parse(xmlhttp.responseText);  返回数据空了不知道是什么原因。
      

  2.   

    你返回的是什么?
    alert(xmlhttp.responseText)
      

  3.   


    var info = xmlhttp.responseText;
    这样返回是:
    {"traderates_get_response":{"trade_rates":{"trade_rate":[{"content":"很好!","nick":"平地","result":"good","valid_score":false},{"content":"不错!","nick":"平地","result":"good","valid_score":true}]},"total_results":2}}
    var info = JSON.parse(xmlhttp.responseText);  
    这样返回没有没有任何数据,页面空白