摘要: 一、基础 Function 是一个构造器,能创建Function对象,即JavaScript中每个函数实际上都是Function 对象。 构造方法: new Function ([arg1[, arg2[, ...argN]],] functionBody) 说明:arg1、arg2等为构造器的参数 阅读全文
posted @ 2018-05-09 11:15 天赋流觞 阅读(355) 评论(0) 推荐(0) 编辑
摘要: this指向的几种情况 1.全局中调用 this.name //this指向window对象 2.函数调用 test();//test()函数中的this也指向window对象 3.对象的方法调用 obj1.fn();//obj1对象的fn()方法中的this指向obj1 4.调用构造函数 var 阅读全文
posted @ 2018-05-09 09:38 天赋流觞 阅读(185) 评论(0) 推荐(0) 编辑