【发布时间】:2016-03-09 03:48:12
【问题描述】:
我目前正在处理一个 html 表单。如何将密码的最小长度设置为 8,以便它拒绝用户输入的任何小于 8 的密码。如何做到这一点?
代码如下:
<div id="login-form">
<form method="post">
<table align="center" width="30%" border="0">
<tr>
<td><input type="text" name="email" placeholder="Your Email" required /></td>
</tr>
<tr>
<td><input type="password" name="pass" placeholder="Your Password" required /></td>
</tr>
<tr>
<td><button type="submit" name="btn-login">Sign In</button></td>
</tr>
<tr>
<td><a href="register.php">Sign Up Here</a></td>
</tr>
</table>
</form>
</div>
【问题讨论】:
标签: html forms html-input