backbone 入门笔记

访问量: 915

refer to: https://github.com/jashkenas/backbone

backbone很重要, 超过2W人的关注.  写个最最简单的入门吧.

on: 绑定一个事件

object.on("alert", function(msg) {
  alert("Triggered " + msg);
});

off: 取消一个绑定的事件

object.off("change", onChange);

trigger: 触发一个事件

订阅/RSS Feed

Subscribe

分类/category