Кстати, я используя для этого приложение QuickEdit
Код: Выделить всё
let button = document.getElementByld("btn");
let text = document.getElementByld("text");
button.addEventListener('click', function() {
text.style.color = 'green';
})Код: Выделить всё
#text {
color: red;
}Код: Выделить всё
This is a sample text
Change text colorПодробнее здесь: https://stackoverflow.com/questions/787 ... the-button
Мобильная версия