摘要:
1.原型链function SuperType(){ this.property = true;}SuperType.prototype.getSuperValue = function(){ return this.property;};function SubType(){ this.subproperty = false;}//inherit from SuperTypeSubType.prototype = new SuperType();SubType.prototype.getSubValue = function (){ return this.subpr... 阅读全文
摘要:
1.最简单的创建对象方法var person = new Object();person.name = "sam wu";person.age = 25;person.job = "frontend engineer";person.sayName = function(){ alert(this.name);};person.sayName();2.工厂模式创建对象function createPerson(name, age, job){ var o = new Object(); o.name = name; o.age = age; o.job 阅读全文
摘要:
简易瀑布流(基于多栏列表流体布局实现) 封装成jQuery插件如下 封装成jQuery插件,简易瀑布流(基于多栏列表流体布局实现) 阅读全文