11 2016 档案

摘要:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> #btn{ width: 200px; height: 300px; position: absolute; le 阅读全文
posted @ 2016-11-25 09:12 林子lxl 阅读(3526) 评论(0) 推荐(1)
摘要:函数带有参数传入进去,改变的是局部变量 阅读全文
posted @ 2016-11-14 19:04 林子lxl 阅读(155) 评论(0) 推荐(0)
摘要:function disabledMouseWheel() { if (document.addEventListener) { document.addEventListener('DOMMouseScroll', scrollFunc, false); //W3C }else{ window.o 阅读全文
posted @ 2016-11-08 19:21 林子lxl 阅读(4240) 评论(0) 推荐(1)
摘要:自己制作了一个模仿抽奖转盘的小游戏,代码比较简单,规则是只有三次抽奖机会,并且浏览器会记录抽奖的次数, 代码如下 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=dev 阅读全文
posted @ 2016-11-05 10:59 林子lxl 阅读(1307) 评论(0) 推荐(0)
摘要:个人感觉jq更加便捷,把js原生里面的长单词加以缩写,理解了字面意思基本上就知道代表什么了,而且的代表的是一个对象,返回的也是个对象 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> </title> <style type=" 阅读全文
posted @ 2016-11-03 17:41 林子lxl 阅读(221) 评论(0) 推荐(0)
摘要:使用var 定义变量还会提升变量声明,即使用var定义:function hh(){ console.log(a); var a = 'hello world';}hh() //undefined不使用var定义:function hh(){ console.log(a); a = 'hello w 阅读全文
posted @ 2016-11-01 17:46 林子lxl 阅读(547) 评论(0) 推荐(0)
摘要://基数,随便选一个数组里面的数.一般情况下取素组中间的数字(这个基数决定了快速排序算法的优劣) var arr = [43,2,8,3,5,12,85,9,23]; //快速排序的函数 function quickSort(Array1){ if(Array1.length <= 1){ retu 阅读全文
posted @ 2016-11-01 15:02 林子lxl 阅读(193) 评论(0) 推荐(0)