由于pattern属性,我们可以在你的markup里面直接使用正则表达式了下面我们给大家介绍一下html5正则表达式技巧
<form action="" method="post"> <label for="username">Create a Username: </label> <input type="text" name="username" id="username" placeholder="4 <> 10" pattern="[A-Za-z]{4,10}" autofocus required> <button type="submit">Go </button> </form>
html5正则表达式技巧的精彩内容就先到这里。更多精彩内容,还请大家持续关注精品。
相关推荐:
html5语义格式技巧是什么