JS对象添加新的字段

var test={name:"name",age:"12"};

test.id = "12345";

直接定义添加就成了

posted @ 2016-05-10 19:35  Danlis  阅读(6238)  评论(0编辑  收藏  举报