07 2015 档案
摘要:http://www.cnblogs.com/snandy/archive/2011/03/03/1970132.html
阅读全文
摘要:方法1.利用另一个临时变量var arr=[1,2,3,4,5,1,2,3,45,2];function uniq(arr){ var temp=[]; for(var i in arr){ if(temp.indexOf(arr[i])<0){ te...
阅读全文
摘要:http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
阅读全文
摘要:referencehttp://stackoverflow.com/questions/16568272/why-doesnt-the-height-of-a-container-element-increase-if-it-contains-floated-el/16568504#16568504
阅读全文
摘要:overflow occur whenA line cannot be broken, causing the line box to be wider than the block box.A block-level box is too wide for the containing block...
阅读全文
摘要:我们知道链接的 onclick 事件被先执行,其次是 href 属性下的动作(页面跳转,或 javascript 伪链接),如果不想执行href 属性下的动作执行,onclick 需要要返回 false ,一般是这样写onclick="xxx();return false;".a标签的应用 1、提...
阅读全文
摘要:if(!document.getElementsByClassName){ document.getElementsByClassName=function(classname){ var allTags=document.getElementsByTagName('*'); ...
阅读全文
摘要:方法一.element { width: 600px; height: 400px; position: absolute; left: 0; top: 0; right: 0; bottom: 0; margin: auto; /* 有了这个就自动居中了 */}方法二.el...
阅读全文
摘要:有时候对同一个目标元素,选择器有多种不同的写法。具体哪种声明会生效,主要看层叠关系层叠关系主要看三层,分别是特殊性,权重和顺序。1.特殊性选择器有各自的特殊性。内联样式为1000,id选择器为100,class选择器和属性选择器为10,各个元素为1,通配选择器为0(0比没有大,继承的特殊性就是没有,...
阅读全文

浙公网安备 33010602011771号