MyView = Backbone.View.extend({ events: { 'click .item': 'handleClick' }, handleClick: function(e) { this; // The view instance e.target; // The element that was clicked e.currentTarget; // The element that was bound by the click event } });
MyView = Backbone.View.extend({ events: { 'click .item': 'handleClick' }, handleClick: function(e) { this; // The view instance e.target; // The element that was clicked e.currentTarget; // The element that was bound by the click event } });
Backbone.js 是一种重量级javascript MVC 应用框架,通过Models进行key-value绑定及custom事件处理,通过Collections提供一套丰富
Backbone的学习经验之谈
Backbone.Collection
1 2 3 4 5 6 Hello World in Backbone.js 7 8 9 10 11 12 13 Loading...14 15 16 17 18 19 20 21 22 23 24 25 26 42 43 44
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M