Object.create() 实现

if (typeof Object.create !== 'function') {
        Object.create = function (o) {
            function F() {}
            F.prototype = o;
            return new F();
        }
    }

 

posted @ 2013-12-17 11:39  sexy_girl  阅读(206)  评论(0编辑  收藏  举报