Slide 23
Slide 23 text
せやねボタン
document.getElementById('.seyane-button').addEventListener('click', () => {
fetch('https://test.com/seyane', {
method: 'POST',
})
.then(res => {
if (res.ok) {
document.getElementById('.seyane-button').style.color = 'gray';
}
return res.json()
})
.then({ count } => {
document.getElementById('.seyane-counter').innerHTML = count;
});
});