鏈式調用

var Run = function (arg) {
  return new Run.prototype.init(arg)
}
Run.prototype = {
  init: function () {
    this.name = 'xw'
    return this
  },
  save: function () {
    return this
  }
}
Run.prototype.init.prototype = Run.prototype
相關文章
相關標籤/搜索