📜  主干 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:49.536000             🧑  作者: Mango

代码示例2
var ViewName = Backbone.View.extend({  
   initialize: function(){  
      this.$el.on("eventName", this.functionName, this)  
   },  
   functionName: function(){  
    //whatever  
   },
   remove: function() {
      this.$el.off("eventName", this.functionName);
      Backbone.View.prototype.remove.apply(this, arguments);
   }  
});