gpt4 book ai didi

javascript - 为什么当我使用输入类型数字并且我也使用正则表达式模式 ="[0-9\/]*"时 e 字符正在工作任何解决方案

转载 作者:行者123 更新时间:2023-12-03 06:17:57 26 4
gpt4 key购买 nike

为什么当我使用输入类型数字并且我也使用正则表达式时 e 字符起作用 pattern="[0-9\/]*" 任何解决方案

最佳答案

RTFM? https://developer.mozilla.org/en/docs/Web/HTML/Element/input

pattern HTML5

A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email or password; otherwise it is ignored. The regular expression language is the same as JavaScript RegExp algorithm, with the 'u' parameter that makes it treat the pattern as a sequence of unicode code points. The pattern is not surrounded by forward slashes.

关于javascript - 为什么当我使用输入类型数字并且我也使用正则表达式模式 ="[0-9\/]*"时 e 字符正在工作任何解决方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39002291/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com