feat: add javascript

This commit is contained in:
Mike 2023-11-06 12:04:08 -05:00
parent 4ea49a9e74
commit 81be0a6509
2 changed files with 16 additions and 2 deletions

View file

@ -35,8 +35,8 @@
<input type="password" name="password" id="password" required minlength="8"> <input type="password" name="password" id="password" required minlength="8">
</div> </div>
<div class="form-input"> <div class="form-input">
<label for="password_confirmation">CONFIRM PASSWORD</label> <label for="password-confirmation">CONFIRM PASSWORD</label>
<input type="password" name="password_confirmation" id="password_confirmation" required <input type="password" name="password-confirmation" id="password-confirmation" required
minlength="8"> minlength="8">
</div> </div>
<div class="form-button"> <div class="form-button">

View file

@ -0,0 +1,14 @@
const name = document.querySelector('#name'),
email = document.querySelector('#email'),
password = document.querySelector('#password'),
passwordConfirmation = document.querySelector('#password-confirmation')
passwordConfirmation.addEventListener('keyup', e => {
if (password.value === e.target.value ) {
console.log('they equal');
} else {
console.log('They don\'t equal');
}
})