摘要: 通过判断浏览器的userAgent,用正则来判断是否是ios和Android客户端。代码如下: <script type="text/javascript"> var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 阅读全文
posted @ 2019-05-03 15:23 yvioo 阅读(2750) 评论(0) 推荐(0) 编辑
摘要: Enumeration<String> paraNames=request.getParameterNames(); for(Enumeration<String> e=paraNames;e.hasMoreElements()){ String thisName=e.nextElement()+" 阅读全文
posted @ 2019-05-03 15:19 yvioo 阅读(7909) 评论(0) 推荐(0) 编辑
摘要: function isDate8(sDate) { if (!/^[0-9]{8}$/.test(sDate)) { return false; } var year, month, day; year = sDate.substring(0, 4); month = sDate.... 阅读全文
posted @ 2019-05-03 15:17 yvioo 阅读(2163) 评论(0) 推荐(0) 编辑
摘要: /* 验证手机号 */ function isPhoneNo(phone) { var pattern = /^1[3456789]\d{9}$/; return pattern.test(phone); } 只验证了手机长度和手机首位必须是1开头,第二位必须是3,4,5,6,7,8,9 ,正确返回 阅读全文
posted @ 2019-05-03 15:15 yvioo 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 正确返回true 错误返回false isIdCardNo.js function isIdCardNo(num) { var factorArr = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1); var par 阅读全文
posted @ 2019-05-03 15:14 yvioo 阅读(279) 评论(0) 推荐(0) 编辑
摘要: public static List getImg(String htmlStr) { List list = new ArrayList(); String img = ""; Pattern p_image; Matcher m_image; // String regEx_img = "]*?>"; //图片链... 阅读全文
posted @ 2019-05-03 15:12 yvioo 阅读(2201) 评论(0) 推荐(0) 编辑
摘要: function jqchk(){ //jquery获取复选框值 var chk_value =[]; $('input[class="sel"]:checked').each(function(){ chk_value.push($(this).val()); }); if(chk_value.l 阅读全文
posted @ 2019-04-28 11:43 yvioo 阅读(9958) 评论(0) 推荐(0) 编辑
摘要: 总选框: 子选框: /** * 全选 反选 */ $(".all").bind("click",function(){ $(".sel").prop("checked",$(this).prop("checked")); }) $(".s... 阅读全文
posted @ 2019-04-28 11:39 yvioo 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 上传 下载 阅读全文
posted @ 2019-04-23 09:13 yvioo 阅读(6005) 评论(0) 推荐(0) 编辑
摘要: var mo=function(e){ e.preventDefault() }; /***禁止滑动***/ function stop(){ document.body.style.overflow='hidden'; document.addEventListener("touchmove",mo,false);//禁止页面滑动 } /***取消滑动限制***/... 阅读全文
posted @ 2019-04-19 10:29 yvioo 阅读(616) 评论(0) 推荐(0) 编辑