pattern只用new RegExp("^[1-9]\d$").test(valu),进行校验,pattern: "^[1-9]\d$", 当使用构造函数创造正则对象时,需要常规的字符转义规则(在前面加反斜杠 \)
![l***@163.com](https://img-cdn-tc.dcloud.net.cn/account/identicon/cd23e22fa9171d874320aa2d8677b4b0.png)
l***@163.com
- 发布:2021-04-30 10:53
- 更新:2021-04-30 10:53
- 阅读:408
0 个回复