摘要:
原型链的学习1 function MyObject(){};2 function MyObjectEx(){};3 //构造2的原型设置为构造1的实例4 MyObjectEx.prototype = new MyObject();//导致原型链错误,需要维护5 var obj1 = new MyObject();6 var obj2 = new MyObjectEx();7 alert(obj1.constructor==obj2.constructor);//true8 alert(MyObjectEx.prototype.co... 阅读全文