03 2015 档案

js兼容性
摘要:JS的兼容性:1.ev||event2.addEventListener||attachEvent3.document.documentElement.scollTop||body4.getElementsByClassName5.setCapture6.firstChild||element7.l... 阅读全文

posted @ 2015-03-03 09:39 wish&will 阅读(89) 评论(0) 推荐(0)

转驼峰
摘要:var str='border-left-color';str=str.replace(/-[a-z]/ig,function(s){ return s.charAt(1).toUpperCase();});alert(str); 阅读全文

posted @ 2015-03-03 09:36 wish&will 阅读(121) 评论(0) 推荐(0)

用事件委托的方法点击每个li让其删除
摘要:无标题文档 1 2 3 4 5 6 7 8 9 阅读全文

posted @ 2015-03-03 09:34 wish&will 阅读(424) 评论(0) 推荐(0)

==和===的区别
摘要:alert(true==false); falsealert(true===false); falsealert('12'==12); truealert('12'===12); falsealert(null==undefined); truealert(null===undefined); fa... 阅读全文

posted @ 2015-03-03 09:30 wish&will 阅读(138) 评论(0) 推荐(0)

严格模式的作用
摘要:1.修复了局部函数this问题。2.定义变量必须加var。3.if、for语句里不允许有定义函数。4.干掉了with。 阅读全文

posted @ 2015-03-02 14:49 wish&will 阅读(311) 评论(0) 推荐(0)