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