HTML5 使用正则表达式

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

<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>