mirror of
https://github.com/ChenKaiLiuG/find_your_own_fxxking_problem.git
synced 2026-06-17 08:44:24 +00:00
7 lines
182 B
JavaScript
7 lines
182 B
JavaScript
const toggleButton = document.getElementById('toggle-theme');
|
|
const body = document.body;
|
|
|
|
toggleButton.addEventListener('click', () => {
|
|
body.classList.toggle('dark-mode');
|
|
});
|