diff options
Diffstat (limited to 'rannak/endPage/main.js')
-rw-r--r--[-rwxr-xr-x] | rannak/endPage/main.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/rannak/endPage/main.js b/rannak/endPage/main.js index 1f4a3c5..2813fc0 100755..100644 --- 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; + } +} |