The goal of this assignment is to have you work on a small project using the programming language of your choice, covering the following aspects: 1. User Interf

const inputs = form.elements;
const form = document.getElementById(‘form’);

for (i = 0; i < inputs.length; i++) {
inputs[i].addEventListener(‘invalid’, function () {
form.className = ‘submitted’;
});
};

function checkPassword() {
const password = document.getElementById(‘password’).value;
const passwordConfirm = document.getElementById(‘password-confirm’).value;
const passwordInput = document.getElementById(‘password’);
const passwordConfirmInput = document.getElementById(‘password-confirm’);

if (password == passwordConfirm) {
passwordInput.style.borderColor = ‘green’;
passwordConfirmInput.style.borderColor = ‘green’;
} else if (password =! ‘’ && passwordConfirm == ‘’){
return;
} else {
passwordInput.style.borderColor = ‘red’;
passwordConfirmInput.style.borderColor = ‘red’;
}
}

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.