Browse Source

Delete 'script.js'

master
BARRAUX Arthur 3 years ago
parent
commit
6da2d53591
  1. 42
      script.js

42
script.js

@ -1,42 +0,0 @@
const button = document.getElementById('submit');
const page = document.getElementById('page');
const check = document.getElementsByClassName('check');
const excla = document.getElementsByClassName('excla');
const entry = document.getElementsByClassName('entry');
const help = document.getElementsByClassName('help');
function displayHelp(id) {
id.style.display = 'block';
}
function hideHelp(id) {
id.style.display = 'none';
}
function checkInputs() {
for (let i=0; i < entry.length ; i++) {
console.log(i);
if (entry[i].type != 'button') {
if (entry[i].value == '') {
setError(i);
}
else {
setSuccess(i);
}
}
}
}
function setError(indice) {
check[indice].style.display = 'none';
excla[indice].style.display = 'block';
document.getElementsByTagName('small')[indice].style.display = 'block';
}
function setSuccess(indice) {
check[indice].style.display = 'block';
excla[indice].style.display = 'none';
document.getElementsByTagName('small')[indice].style.display = 'none';
}
Loading…
Cancel
Save