标签:
var s = "{a:1,b:2}"; console.log(typeof s); s = eval("(" + s + ")"); console.log(s); console.log(s.a);
eval()字符串转成对象
原文地址:http://www.cnblogs.com/xupeiyu/p/4455978.html