0

Почему не работает?

Почему? https://code.sololearn.com/WC4aBMkhI5oX/?ref=app

20th Jun 2021, 2:14 PM
UlTWorker
UlTWorker - avatar
2 Answers
+ 1
Paste this code on js may be it will work //var btn = document.getElementsByTagName("button")[0]; var x = 0; function u() { x++; document.getElementsByTagName("button")[0].style.backgroundColor = "green"; document.getElementsByTagName("button")[0].style.color = "#87CEFA"; if (x == 2) { document.getElementsByTagName("button")[0].style.backgroundColor = "red"; document.getElementsByTagName("button")[0].style.color = "white"; x = 0 } }
20th Jun 2021, 2:17 PM
A S Raghuvanshi
A S Raghuvanshi - avatar
+ 1
Thank
20th Jun 2021, 2:27 PM
UlTWorker
UlTWorker - avatar