Object.create方法创建一个使用原对象作为其原型的新对象。
1 if (
typeof Object.create !== 'function'
) {
2 Object.create =
function (o) {
3 function F() {}
4 F.prototype =
o;
5 return new F();
6 };
7 }
8 newObject = Object.create(oldObject);
转载于:https://www.cnblogs.com/qzsonline/archive/2012/07/12/2588807.html