04 2017 档案
摘要:工厂模式 function createPersonal(name,age,job){ var o = new Object(); o.name = name; o.age = age; o.job = job; o.sayName = function(){ alert(this.name); }
阅读全文
摘要:实现原型链有一种基本模式,其代码大致如下: function A(){ this.property = true; } A.prototype.getAvalue = function(){ return this.property; }; function B(){ this.property =
阅读全文
浙公网安备 33010602011771号