摘要:
1.手机号正则表达式: /^[3-9]{1}[0-9]{9}$/.test(phone) 2.验证码四位纯数字: //取后面四位 Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * 10 ** (4-1)) 阅读全文
posted @ 2022-02-22 11:48
cc-front
阅读(3201)
评论(0)
推荐(0)
摘要:
1.replace(‘字符串值’,'自定义值*****') 2.replaceAll('字符串值','自定义值') =>这个方法是新出来的可以匹配找到所有值来替换,上面可能在匹配时只能换掉第一个字符 用法:值.toString().replace('值',‘替换自定义新值’) 'aaassss'.t 阅读全文
posted @ 2022-02-22 11:39
cc-front
阅读(156)
评论(0)
推荐(0)

浙公网安备 33010602011771号