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

What is happening in Crockford's object creation technique?

时间:2014-07-30 20:30:45      阅读:272      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   io   for   cti   div   

 

 

What is happening in Crockford‘s object creation technique?

http://stackoverflow.com/questions/2766057/what-is-happening-in-crockfords-object-creation-technique

 

//创建对象
    if (typeof Object.create !== "function") {
        Object.create = (function () {
            function F() {} // created only once
            return function (o) {
                F.prototype = o; // reused on each invocation
                return new F();
            };
        })();
    }

 

What is happening in Crockford's object creation technique?,布布扣,bubuko.com

What is happening in Crockford's object creation technique?

标签:style   blog   http   color   io   for   cti   div   

原文地址:http://www.cnblogs.com/didi/p/3878708.html

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