mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-26 22:30:44 -05:00
feat: add javascript
This commit is contained in:
parent
4ea49a9e74
commit
81be0a6509
2 changed files with 16 additions and 2 deletions
|
@ -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">
|
||||||
|
|
|
@ -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');
|
||||||
|
}
|
||||||
|
})
|
Loading…
Reference in a new issue