diff options
Diffstat (limited to 'rannak/endPage')
-rw-r--r-- | rannak/endPage/index.html | 2 | ||||
-rw-r--r-- | rannak/endPage/main.js | 14 |
2 files changed, 14 insertions, 2 deletions
diff --git a/rannak/endPage/index.html b/rannak/endPage/index.html index 24b42a7..a3bcfc7 100644 --- a/rannak/endPage/index.html +++ b/rannak/endPage/index.html @@ -4,7 +4,7 @@ <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> - <title> Tehtud</title> + <title>Tehtud</title> <link rel="stylesheet" href="style.css" type="text/css"/> </head> diff --git a/rannak/endPage/main.js b/rannak/endPage/main.js index 2813fc0..7f21f65 100644 --- a/rannak/endPage/main.js +++ b/rannak/endPage/main.js @@ -7,7 +7,6 @@ if (localStorage.roll != undefined){ 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; @@ -15,4 +14,17 @@ if (localStorage.roll != undefined){ delete localStorage.asula; delete localStorage.kaugus; } + + else if (roll == 'Direktori'){ + document.querySelector('h3').innerHTML = 'Baltiketti andmed:'; + spans[3].innerHTML = 'Baltiketi pikkus: ' + localStorage.teekond; + spans[1].innerHTML = 'Asula: ' + localStorage.asula; + spans[2].innerHTML = 'Kaugus: ' + localStorage.kaugus; + + console.log(localStorage.teekond); + + delete localStorage.asula; + delete localStorage.kaugus; + delete localStorage.teekond; + } } |