随笔分类 - jQuery
jQuery
摘要:var mobReg=/^1[34578]\d{9}$/; //手机号 if (!mobReg.test(mob)) { alert("请填写正确手机号!"); }; var telReg=/^0\d{2,3}-?\d{7,8}$/; //电话号码 if (!telReg.test(tel)) {
阅读全文
摘要:http://api.map.baidu.com/marker?location="+lat+","+lng+"&title="+shopname+"&content="+shopname+"&output=html
阅读全文
摘要:$.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name]) { if (!o[this.name].push) { o[
阅读全文
摘要:###直接返回当前页的上一页,数据全部消息,是个新页面 history.back(-1) ###//后退,刷新上一页 window.location.go(-1); ###//后退不刷新,表单里的数据全部还在 history.go(-1) ###刷新 history.back(0) ###前进 hi
阅读全文
摘要:上传文件时,选择了文件后想清空文件路径,搜索了一下,用两种方法解决 第一种: 第二种:
阅读全文
摘要:直接上代码,复制粘贴即可 HTML代码(localhost/index.html) PHP代码(test.com本地配置虚拟域名即可) test.com/abc.php //第二种方法,原理就是请求雅虎的服务器去请求别的服务器
阅读全文