eval()方法可以转换非标准字符串 例如:var str=’{error:0,id:1,time:1234567,acc:0,ref:0}’; var obj=eval("("+str+")"); console.log(obj);