Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任何人都可以举一个关于如何使用 Backbone.js 基于鼠标单击加载新 div 容器的小例子吗?我想将一个新的 div 容器添加到我已经存在的 html 内容中。
在视图类中:
events: { "click #myButton": "insertDiv" } insertDiv: function(event) { this.$el.append("<div>...</div>"); }