<div id="container"> <input type="button" id="test_click" value="测试" /> </div> var View = Backbone.View.extend({ //el: ‘#container‘,//注释了就不可以了... template: _.template($("#item-template").html()), events: { ‘click #test_click‘: ‘chose_page‘ }, chose_page: function () { alert("chose_page"); }, });
时间: 2024-10-08 08:29:00