摘要: function stripscript(s) { var pattern = new RegExp("[%--`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?]") //格式 RegExp("[在中间定义特殊过滤字符]")var 阅读全文
posted @ 2018-01-19 10:20 暖爱 阅读(4686) 评论(0) 推荐(0) 编辑
摘要: 三种方案: 第一:使用url传参,给rul加 ?index=x eg:https://www.baidu.com?index=1 $.sidebarMenuActive = function() { var index = 0; var oList = $('.js_sidebarMenu'); v 阅读全文
posted @ 2018-01-17 18:55 暖爱 阅读(1432) 评论(0) 推荐(0) 编辑
摘要: 在看效果时发现在Chrome中的table已经不是原来设置的宽度了,而其他浏览器是好的,经过百度发现是单元格内容过多造成的,但这时候给td设置宽度已经不适用了,此时就要给table设置 table{table-layout:fixed;} table-layout属性 用法:作用于table标签,显 阅读全文
posted @ 2018-01-08 11:12 暖爱 阅读(1727) 评论(0) 推荐(0) 编辑
摘要: http://yisibl.github.io/cubic-bezier/#.17,.67,.94,.53 前言 在了解 cubic-bezier 之前,你需要对 CSS3 中的动画效果有所认识,它是 animation-timing-function 和 transition-timing-fun 阅读全文
posted @ 2017-12-15 17:10 暖爱 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 通常做注册页面时会有获取验证码按钮,然后点击后过60秒才能重新获取,比如现在项目中遇到的 然后点击后的样式,并且数字是递减的,到0时重新回到最初的状态(上图)。 首先构造HTML结构 <button class="getCode">获取验证码</button> css就略了 JS实现: var wa 阅读全文
posted @ 2017-11-22 17:28 暖爱 阅读(325) 评论(0) 推荐(0) 编辑
摘要: // _ooOoo_ // o8888888o // 88" . "88 // (| -_- |) // O\ = /O // ____/` '\____ // . ' \\| |// `. // / \\||| : |||// \ // / _||||| -:- |||||- \ // | | \ 阅读全文
posted @ 2017-11-22 13:06 暖爱 阅读(100) 评论(0) 推荐(0) 编辑
摘要: <input type="text" class="txt NumText" Width="100px" /> $(function(){ /*JQuery 限制文本框只能输入数字*/ $(".NumText").keyup(function(){ $(this).val($(this).val() 阅读全文
posted @ 2017-11-17 09:47 暖爱 阅读(985) 评论(0) 推荐(0) 编辑
摘要: http://ustbhuangyi.github.io/picker/ 阅读全文
posted @ 2017-10-27 15:18 暖爱 阅读(619) 评论(0) 推荐(0) 编辑
摘要: position: absolute; left: 0; right: 0; top: 0; bottom: 0; margin: auto; 阅读全文
posted @ 2017-09-27 17:48 暖爱 阅读(90) 评论(0) 推荐(0) 编辑
摘要: var tap = "ontouchstart" in document.documentElement ? "touchend" : "click"; $("#inputClose").live("tap", function(){ $("#search").val(''); }) 阅读全文
posted @ 2017-09-21 14:02 暖爱 阅读(130) 评论(0) 推荐(0) 编辑