From 6da2d5359158ca0eb47e50f478c7b74b9b8528a7 Mon Sep 17 00:00:00 2001 From: BARRAUX Arthur Date: Thu, 28 Oct 2021 18:47:11 +0200 Subject: [PATCH] Delete 'script.js' --- script.js | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 script.js diff --git a/script.js b/script.js deleted file mode 100644 index 537a37d..0000000 --- a/script.js +++ /dev/null @@ -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'; -}