上一页 1 ··· 92 93 94 95 96
摘要: <!DOCTYPE html .main { width: 300px; height: 300px; background: red; } .content { width: 100px; height: 100px; background: blue; } // $(function() { / 阅读全文
posted @ 2016-08-07 14:29 最骚的就是你 阅读(1615) 评论(0) 推荐(0) 编辑
摘要: 预解析的过程 代码的执行过程 程序在执行过程,会先将代码读取到内存中检查,会将所有的声明在此时进行标记。所谓的标记就是让js解释器直到有这个名字,后面在使用名字的时候,不会出现未定义的错误,这个标记就是提升 声明: 名字的声明,标识符的声明(变量名的提升) 名字的声明就是让我的解释器知道有这个名字 阅读全文
posted @ 2016-08-07 11:00 最骚的就是你 阅读(298) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html window.onload = function() { function GetURLlist(name) { var reg = new RegExp("(^|&)" + name + "=([^&] )(&|$)"); var r = window.locatio 阅读全文
posted @ 2016-08-07 10:54 最骚的就是你 阅读(4242) 评论(2) 推荐(0) 编辑
摘要: 人们对于this的绑定常常有两个误解,一:指向函数本身,二:指向函数作用域。这两种想法都是错的,this并不指向函数本身,也不指向函数作用域。 复制代码 function foo(){ this.count++; } foo.count = 0; for(var i = 0 ; i 显示绑定 隐式绑 阅读全文
posted @ 2016-08-07 10:52 最骚的就是你 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 一、变量的作用域 要懂得闭包,起首必须懂得Javascript特别的变量作用域。 变量的作用域无非就是两种:全局变量和局部变量。 Javascript说话的特别之处,就在于函数内部可以直接读取全局变量。 Js代码 var n=999; function f1(){ alert(n); } f1(); 阅读全文
posted @ 2016-08-07 10:35 最骚的就是你 阅读(359) 评论(0) 推荐(0) 编辑
摘要: $('body').on('touchstart', ' gallerySlider img', function(e) { var touch = e.originalEvent, startX = touch.changedTouches[0].pageX; startY = touch.cha 阅读全文
posted @ 2016-07-12 15:00 最骚的就是你 阅读(7261) 评论(1) 推荐(0) 编辑
摘要: <!doctype html Document input[type="range"] { width: 80%; background color: red; border radius: 15px; webkit appearance: none; height: 1px; position: 阅读全文
posted @ 2016-06-07 15:04 最骚的就是你 阅读(1401) 评论(0) 推荐(0) 编辑
摘要: 博客园 为什么都需要支付宝捐钱 阅读全文
posted @ 2016-03-11 15:48 最骚的就是你 阅读(497) 评论(0) 推荐(0) 编辑
上一页 1 ··· 92 93 94 95 96