我有一个项目,我必须在其中添加注册表单,我想验证密码和确认字段是否相等而不单击注册按钮.
如果密码和确认密码字段不匹配,那么我还想在确认密码字段的旁边放置一条错误消息并禁用注册按钮.
以下是我的HTML代码..
<form id="form" name="form" method="post" action="registration.php">
<label >username :
<input name="username" id="username" type="text" /></label> <br>
<label >password :
<input name="password" id="password" type="password" /></label>
<label>confirm password:
<input type="password" name="confirm_password" id="confirm_password" />
</label>
<label>
<input type="submit" name="submit" value="registration" />
</label>
Run Code Online (Sandbox Code Playgroud)
有没有办法做到这一点?在此先感谢您的帮助.
我有一个项目,我想在我的网站的右上角显示一个注销按钮.
我使用以下代码无法正常工作.
<form align="right" name="form1" method="post" action="log_out.php">
<label>
<input name="submit2" type="submit" id="submit2" value="log out">
</label>
</form>
Run Code Online (Sandbox Code Playgroud)