2014年1月3日
摘要: 先看段代码:function Introduce(name,age){ document.write("My name is "+name+".I am "+age);}var p=new People();Introduce.call(p,"Windking",20);用了call之后,Introduce就成了p的方法,不知道这样说你明白了么?使用了call方法,上述的代码就等同于了这个代码:function People(name,age){ this.name=name; this.age=age; this.Introduce 阅读全文
posted @ 2014-01-03 17:40 简单,快乐 阅读(136) 评论(0) 推荐(0) 编辑