parent
c29d6d937b
commit
68bdad57a7
4 changed files with 31 additions and 4 deletions
@ -0,0 +1,11 @@ |
||||
for (let i = 1; i <= 25; i++){ |
||||
let buttons = document.querySelectorAll(`#day-${i} > button`); |
||||
|
||||
buttons.forEach(button => { |
||||
button.addEventListener('click', async () => { |
||||
const response = await (await fetch(button.dataset['url'])).json(); |
||||
|
||||
document.getElementById('response').innerText = response.result; |
||||
}); |
||||
}); |
||||
} |
Loading…
Reference in new issue