javascript 把字符串转换为对象 function strToJson(str) { var json = (new Function("return " + str))(); return json;}