09 2016 档案

摘要:object.prototype.call call函数中的this指向 使用call对象的构造函数链 使用call调用匿名函数 使用call调用函数的上下文this 以DOM为例子 // 不用call 阅读全文
posted @ 2016-09-18 17:35 AlanTao 编辑
摘要:forEach是Array新方法中最基本的一个,就是遍历,循环。先看以前是怎么遍历数组的 常用遍历 排除null与undefined和不存在元素的遍历 排除undefined和不存在元素的遍历 跳过不存在的元素,如没有值的undefined元素 ECMAScript5中遍历数组元素的新方法,使用fo 阅读全文
posted @ 2016-09-15 13:28 AlanTao 编辑
摘要:IE中,只有keyCode属性,而FireFox中有which和charCode属性 event.which属性对DOM原生的event.keyCode和event.charCode进行了标准化。 阅读全文
posted @ 2016-09-12 15:17 AlanTao 编辑
摘要:Object.prototype.toString()方法返回一个代表该对象的字符串。 使用toString()方法来检测对象类型 封装为classof()函数 阅读全文
posted @ 2016-09-11 14:02 AlanTao 编辑
摘要:1.parseInt(string,radix) 解析整数 指定基数radix //都是返回15 // 更加严格的解析整数函数 parseFloat(string) 解析浮点数 // 更加严格的解析小数函数 阅读全文
posted @ 2016-09-10 17:18 AlanTao 编辑
摘要:一、显示信息的命令 二、点位符:字符(%s)、整数(%d或%i)、浮点数(%f)和对象(%o); 三、信息分组 (console.group(),console.groupEnd()) 四、将对象以树状结构展现 (console.dir()可以显示一个对象所有的属性和方法) 五、显示某个节点的内容 阅读全文
posted @ 2016-09-10 14:28 AlanTao 编辑
摘要:<p style="font-size: 22px; line-height: 160%; background: #08BBF1; color: #fff; margin-bottom: 20px; padding-left: 10px;"></p><p></p> 阅读全文
posted @ 2016-09-10 14:06 AlanTao 编辑

点击右上角即可分享
微信分享提示