效果
代码
<form action="regist.php" >
<div>
<label>用户名:</label>
<input name="username" required >
</div>
<div>
<label>密码:</label>
<input type="password" required name="password">
</div>
<div>
<label for="email">邮箱:</label>
<input id="email" type="email" name="email" placeholder="请输入电子邮箱" required>
</div>
<div>
<label for="repwd">确认密码:</label>
<input id="repwd" type="password" name="repwd" placeholder="请再次输入密码" required>
</div>
<div>
<button>提交</button>
</div>
</form>
<form>
<div>
<label>用户名:</label>
<input id="username" name="username" required>
</div>
<div>
<label>密码:</label>
<input id="password" type="password" required name="password">
</div>
<div>
<button type="button" id="btn">提交</button>
</div>
<div>
</div>
</form>