摘要: 1、验证中文和英文: let pattern = /^[a-zA-Z\u4e00-\u9fa5]+$/ let str = '' console.log(pattern.test(str)) 2、验证手机号码: let pattern = /^[1][3,4,5,7,8][0-9]{9}$/ let 阅读全文
posted @ 2018-09-14 11:08 江峰★ 阅读(261) 评论(0) 推荐(0) 编辑