摘要:
会获得?后面的值。 阅读全文
摘要:
xss攻击,通过输入框的代码。 解决方法:转义。 假设str2是输入的字符串,转义<和>; var str2='<span>hot</span>'; var str2=str2.replace(/</g,'<').replace(/>/g,'>'); 阅读全文
摘要:
ie9下浏览器 cosole.log()会阻止j下面的s加载,删掉多余的console.log()。 阅读全文
摘要:
text-align:center;在ie7下,父级加上会让block状态的子元素居中。ie8以上不会。 阅读全文
摘要:
获取一个元素距离顶部的位置: $(".box").offset().top; 获取window的滚动值: $(window).scrollTop(); 阅读全文
摘要:
dataset.one dataset.oneTwo $().data(); attr(); 阅读全文
摘要:
iframe嵌套多层, window.location.href 当前窗口 window.parent.location.href 当前窗口的父级窗口 window.top.location.href 顶层窗口 阅读全文
摘要:
1、无论多少行都让文字垂直居中; 小技巧 ie8以上可用; display:table-cell;vertical-align:middle; 注意变了 table-cell就不能用float和position了,用了的话table-cell的vertical-align不生效了; table-ce 阅读全文
摘要:
在html和head中间加上: <!-- saved from url=(0014)about:internet --> 阅读全文
摘要:
$.fn.extend({}) $.fn.extend({ aaa:function(){ alert(1); } }); 可以通过对象调用方法 $('.aaa').aaa(); $.extend({}) $.extend({ aaa:function(){ alert(1); } }); 是通过$ 阅读全文