摘要: 会获得?后面的值。 阅读全文
posted @ 2017-08-08 11:09 盖大楼 阅读(106) 评论(0) 推荐(0) 编辑
摘要: xss攻击,通过输入框的代码。 解决方法:转义。 假设str2是输入的字符串,转义<和>; var str2='<span>hot</span>'; var str2=str2.replace(/</g,'&lt').replace(/>/g,'&gt'); 阅读全文
posted @ 2017-08-07 15:00 盖大楼 阅读(112) 评论(0) 推荐(0) 编辑
摘要: ie9下浏览器 cosole.log()会阻止j下面的s加载,删掉多余的console.log()。 阅读全文
posted @ 2017-08-01 16:18 盖大楼 阅读(176) 评论(0) 推荐(0) 编辑
摘要: text-align:center;在ie7下,父级加上会让block状态的子元素居中。ie8以上不会。 阅读全文
posted @ 2017-07-27 11:49 盖大楼 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 获取一个元素距离顶部的位置: $(".box").offset().top; 获取window的滚动值: $(window).scrollTop(); 阅读全文
posted @ 2017-07-26 11:14 盖大楼 阅读(1295) 评论(0) 推荐(0) 编辑
摘要: dataset.one dataset.oneTwo $().data(); attr(); 阅读全文
posted @ 2017-07-25 10:57 盖大楼 阅读(247) 评论(0) 推荐(0) 编辑
摘要: iframe嵌套多层, window.location.href 当前窗口 window.parent.location.href 当前窗口的父级窗口 window.top.location.href 顶层窗口 阅读全文
posted @ 2017-07-24 11:49 盖大楼 阅读(766) 评论(0) 推荐(0) 编辑
摘要: 1、无论多少行都让文字垂直居中; 小技巧 ie8以上可用; display:table-cell;vertical-align:middle; 注意变了 table-cell就不能用float和position了,用了的话table-cell的vertical-align不生效了; table-ce 阅读全文
posted @ 2017-07-24 09:33 盖大楼 阅读(1150) 评论(0) 推荐(0) 编辑
摘要: 在html和head中间加上: <!-- saved from url=(0014)about:internet --> 阅读全文
posted @ 2017-07-19 17:07 盖大楼 阅读(574) 评论(0) 推荐(0) 编辑
摘要: $.fn.extend({}) $.fn.extend({ aaa:function(){ alert(1); } }); 可以通过对象调用方法 $('.aaa').aaa(); $.extend({}) $.extend({ aaa:function(){ alert(1); } }); 是通过$ 阅读全文
posted @ 2017-07-07 11:28 盖大楼 阅读(244) 评论(0) 推荐(0) 编辑