摘要: this指的是,调用函数的那个对象 阅读全文
posted @ 2016-08-18 17:24 ning0_o 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 1、普通函数function normalFn(){ console.log(this); //window return "这是一个普通函数";}normalFn();2、构造函数(构造函数建议首字母大写,与普通函数区分开)function Animal(name){ this.name=... 阅读全文
posted @ 2016-08-18 14:14 ning0_o 阅读(199) 评论(0) 推荐(0) 编辑