3
我以下JS功能。Javascript功能推送问题
responseData:function(resp){
this.jsondata = eval('(' + resp + ')');
this.propList = [];
for (var i = 0;i<this.jsondata.length;i++) {
for (obj in this.jsondata[i]) {
alert(obj); //shows the property name of obj
this.propList.push({
obj : this.jsondata[i][obj] //insert only simple obj string
});
}
}
return this.propList;
}
我想插入我的propList属性名称和值,但插入属性名称此函数插入简单的'obj'作为字符串。我做错了什么?
问候 斯特凡
确定正常工作 ty – Mark 2010-03-29 11:24:48