码迷,mamicode.com
首页 > Web开发 > 详细

JS-圣杯模式

时间:2019-02-24 20:15:32      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:func   uber   模式   function   cto   UNC   struct   str   tor   

var inherit = (function(){

var F = function(){};

return function(Target,Origin){

F.prototype = Origin.prototype;

Target.prototype = new F();

Target.prototype.constructor = Target;

Target.prtotype.uber = Origin.prototype;

}

}())

JS-圣杯模式

标签:func   uber   模式   function   cto   UNC   struct   str   tor   

原文地址:https://www.cnblogs.com/arcbala-1412/p/10427568.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!