summaryrefslogtreecommitdiff
path: root/rannak/endPage/main.js
blob: 2813fc0a9c4ae52185d765dc98c55169134f0bae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const spans = document.querySelectorAll("span");

if (localStorage.roll != undefined){

    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;
    }
}