У меня есть проект, в котором я должен добавить регистрационную форму, и я хочу проверить, что поля пароля и подтверждения равны без нажатия кнопки регистрации.
Если пароль и подтверждение пароля не совпадают, тогда я также хочу поставить сообщение об ошибке на стороне поля подтверждения пароля и отключить кнопку регистрации.
следующий мой 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>
Есть ли способ сделать это? Заранее благодарим за любую помощь.