Добавить script.js

This commit is contained in:
2026-05-24 17:15:11 +03:00
parent 5cca916fbc
commit 4ae20961a3
+14
View File
@@ -0,0 +1,14 @@
document.addEventListener('DOMContentLoaded', function() {
const button = document.getElementById('action-btn');
const statusText = document.getElementById('js-status');
if (button && statusText) {
button.addEventListener('click', function() {
// Показываем скрытый текст при клике
statusText.classList.remove('hidden');
// Меняем текст на кнопке
button.textContent = 'Работает!';
button.style.backgroundColor = '#2ecc71';
});
}
});