From 760e8fff4d4fd71350ddc9b17e85e95a17d4ce8e Mon Sep 17 00:00:00 2001 From: Rasmus Date: Fri, 31 Mar 2023 19:41:34 +0300 Subject: oops --- rannak/endPage/main.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) mode change 100755 => 100644 rannak/endPage/main.js (limited to 'rannak/endPage/main.js') diff --git a/rannak/endPage/main.js b/rannak/endPage/main.js old mode 100755 new mode 100644 index 1f4a3c5..2813fc0 --- a/rannak/endPage/main.js +++ b/rannak/endPage/main.js @@ -1,7 +1,18 @@ -let rollSpan = document.querySelector("span"); ; +const spans = document.querySelectorAll("span"); if (localStorage.roll != undefined){ - rollSpan.innerHTML = localStorage.roll; + + let roll = localStorage.roll; + spans[0].innerHTML = roll; delete localStorage.roll; -} + if (roll == 'Kaitseliitlase'){ + console.log(span1); + document.querySelector('h3').innerHTML = 'Baltiketti andmed:'; + spans[1].innerHTML = 'Asula: ' + localStorage.asula; + spans[2].innerHTML = 'Kaugus: ' + localStorage.kaugus; + + delete localStorage.asula; + delete localStorage.kaugus; + } +} -- cgit v1.2.3