Добавить script.js
This commit is contained in:
@@ -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';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user