2013年5月16日

摘要: function removeHTMLTag(str) { str = str.replace(/<\/?[^>]*>/g, ''); //去除HTML tag str = str.replace(/[ | ]*\n/g, '\n'); //去除行尾空白 //str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行 str = str.replace(/&nbsp;/ig, ''); //去掉&nbsp; str = str.replace(/& 阅读全文

posted @ 2013-05-16 14:22 上善若水--Gro.wing 阅读(445) 评论(0) 推荐(0) 编辑


2013年4月19日

摘要: 正则:/^0?(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/方法:function isMobel() { var s = $("#input_phoneNum").val(); if ((/^0?(13[0-9]|15[012356789]|18[0236789]|14[57])[0-9]{8}$/g.test(s))||(/^13\d{9}$/g.test(s)) || (/^15[0-35-9]\d{8}$/g.test(s)) || (/^18[05-9]\d{8}$/g.test(s))) {alert(& 阅读全文

posted @ 2013-04-19 19:20 上善若水--Gro.wing 阅读(215) 评论(0) 推荐(0) 编辑


Copyright © 2024 上善若水--Gro.wing
Powered by .NET 8.0 on Kubernetes