<form action="/action_page.php">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" pattern="[A-Za-z0-9]{3,9}" title="用户名" placeholder="输入您的用户名"><br><br>
<input type="submit" value="提交">
</form>
pattern="[A-Za-z0-9]{3,9}":输入框输入内容为字母/数字,限制长度为6-9位
属性:
required(必须填写)
<input type="email" required>
autofocus(自动聚焦)
<input type="email" autofocus>
autocomplete(自动填写表单)
<input type="email" aotocomplete>