我有这个 Javascript 变量:
var Item_properties = {
id : null,
keys : [],
hydrate: function() {
//get data
this.id = $('input[id=id]').val();
$("#item_key div input").each(function(index) {
this.keys.push($(this).val());
});
}
无法在键数组中推送任何数据,我收到消息:无法调用未定义的方法“推送”
任何想法 ?