9 lines
275 B
JavaScript
9 lines
275 B
JavaScript
const button = document.querySelector("button")
|
|
|
|
button.addEventListener("click", () => {
|
|
if (document.body.style.backgroundColor == "aqua") {
|
|
document.body.style.backgroundColor = "brown"
|
|
} else {
|
|
document.body.style.backgroundColor = "aqua"
|
|
}
|
|
}) |