我有这个代码:
var Day = Backbone.Model.extend({
default: {
service: 'None',
concert: 'None',
bible: 'None',
social: 'None',
play: 'None'
}
}),
Day_view = Backbone.View.extend({
render: function(){
this.$el.html('Service:' + this.model.service + '<br />Concert:' + this.model.concert + '<br />Bible:' + this.model.bible + '<br />Social:' + this.model.social + '<br />Play:' + this.model.play);
return this;
}
}),
day_view = new Day_view({model: new Day({service: '10', concert: '11', bible: '11', social: '13', play: '14' })});
alert(day_view.render().$el.html());
我明白了:
服务:未定义 音乐会:未定义 圣经:未定义 社交:未定义 播放:未定义
问题出在哪里 ?谢谢