Files
find_your_own_fxxking_problem/js/script.js
2025-04-25 20:57:52 +08:00

7 lines
182 B
JavaScript

const toggleButton = document.getElementById('toggle-theme');
const body = document.body;
toggleButton.addEventListener('click', () => {
body.classList.toggle('dark-mode');
});