Window.TableView = Backbone.View.extend({
initialize: function() {
},
tagName:"tbody",
render: function() {
var self=this;
console.log(self.el);//will log <tbody></tbody>self.el.append("<tr></tr>");
return self.el;
}
);
tbView=new TableView();
tbView.render();
如果我建立一个新视图,并调用渲染函数;我会收到错误 Uncaught TypeError: Object # has no method 'append' has no method 'append' ...有没有办法让它工作?谢谢!