JSON.parse这个是啥?
时间:2014-08-07 18:24:50
收藏:0
阅读:179
var jsontext = ‘{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100","555-0120"]}‘; var contact = JSON.parse(jsontext); document.write(contact.surname + ", " + contact.firstname + ", "+ contact.phone);
JSON.parse是用来把JSON字符串转换成对象的
评论(0)