摘要:        
在javascript中,我们可以把一切看作为是对象(除了三种原始数据类型。不过某些时候,也会被自动包装成为对象),我们可以动态的给一个函数添加属性和方法。例:///定义一个人类;function Person(name,age){ this.name=name; this.age=age;}Person.prototype={ getName:function(){ return this.name; }, getAge:function(){ return this.age; }}我们可以实例化此类,并动态添加方法var fjc=new Person('冯际成',21);v    
阅读全文