Buttons | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Buttons

How do I make it so my ā€œDONT TOUCHā€ button after it says ā€œNO TOUCHINGā€ is there a way for me to add a third click where it says something like ā€œSTOP TOUCHINGā€? https://code.sololearn.com/WV3xa7Ps1v2q/?ref=app

19th Feb 2022, 8:31 PM
Junior
Junior - avatar
1 Resposta
+ 1
function notouchy() { var btn = document.getElementById("button"); if(btn.innerHTML != "NO TOUCHY") btn.innerHTML = "NO TOUCHY"; else btn.innerHTML = "You WON!" }
19th Feb 2022, 9:06 PM
JaScript
JaScript - avatar