Gallery

martes, 20 de octubre de 2026

JS - Cambiar fondo del cuerpo


Cambiar fondo del cuerpo de la p谩gina web al hacer clic



<button id="btnHalloween">馃巸 Activar Halloween</button> <script> const btn = document.getElementById('btnHalloween'); btn.addEventListener('click', () => { document.body.style.backgroundColor = '#12071f'; document.body.style.color = '#ff6600'; alert('¡La maldici贸n de Halloween ha comenzado!'); }); </script>

No hay comentarios:

Publicar un comentario

Documental de Hackers