代码改变世界

js面试题,关于变量提升,作用域,全局变量

2017-05-10 00:13 by 陶俊龙, 498 阅读, 0 推荐, 收藏, 编辑
摘要:/**********seperate line************/ var a = 10; function test() { a = 100; console.log(a); console.log(this.a); var a; console.log(a); } test(); VM3 阅读全文

js中实现事件代理

2017-05-09 23:54 by 陶俊龙, 245 阅读, 0 推荐, 收藏, 编辑
摘要:var count = 10; for(var i = count;i--;){ var div = document.createElement('div'); div.innerHTML = "test_div"+i; div.className = "test_div"; document.b 阅读全文

js中闭包作用举例

2017-05-09 23:32 by 陶俊龙, 301 阅读, 0 推荐, 收藏, 编辑
摘要:模拟实现类的私有属性 function Boy(name){ this.name = name; var sex = 'boy'; this.saySex = function(){ console.log("my sex is "+sex) }; } var xiaoming = new Boy( 阅读全文

js typeof的使用

2017-05-09 23:21 by 陶俊龙, 335 阅读, 0 推荐, 收藏, 编辑
摘要:console.log(typeof 1) console.log(typeof '1') console.log(typeof true) console.log(typeof undefined) console.log(typeof null) VM142:1 numberVM142:3 st 阅读全文

js new的理解

2017-05-09 22:42 by 陶俊龙, 265 阅读, 0 推荐, 收藏, 编辑
摘要:function Cat(name, color){ this.name = name; this.color = color; } Cat.prototype.type = "猫科动物"; Cat.prototype.eat = function(){alert("吃老鼠");} var cat1 阅读全文

mac qq 无法截图

2015-06-01 12:34 by 陶俊龙, 221 阅读, 0 推荐, 收藏, 编辑
摘要:截图功能失效后,如何重启截图功能?在finder中打开应用程序目录,找到QQ,右键单击QQ,选择显示包内容,此时会打开一个文件夹。进入以下路径Library/LoginItems然后双击ScreenCapture这个进程,截图功能即会恢复正常。 阅读全文

zendstudio waiting for xdebug session

2015-05-25 17:18 by 陶俊龙, 254 阅读, 0 推荐, 收藏, 编辑
摘要:1.查看phpinfo输出信息里xdebug是否已配置,xdebug.remote_enable是否为On,waiting for session说明xdebug.remote_port被占用,需要lsof -i:9000找到占用的进程号并kill掉,重启apache,搞定 阅读全文

zendstudio for mac破解版

2015-05-25 16:44 by 陶俊龙, 192 阅读, 0 推荐, 收藏, 编辑
摘要:http://iappleinfo.sinaapp.com/?post=127 阅读全文

phpstorm for mac破解版

2015-05-25 15:21 by 陶俊龙, 246 阅读, 0 推荐, 收藏, 编辑
摘要:http://www.121down.com/mac/softview-19928.html#downaddress 阅读全文

满屏品字布局css

2014-09-16 00:28 by 陶俊龙, 2208 阅读, 0 推荐, 收藏, 编辑
摘要:test 效果图: 阅读全文