I'm working on a trivia code in javascript/html for a class i am taking, and when you press the correct button, i want an image of a check mark to show up. Right now, for my check mark i am using the "opacity" trait:
<img id="checkOne" src="check.jpg" style="opacity: 0">
and then later i wanted to add that if you click the right button, the opacity would change from O to 1 (if you know a better way than this that's fine, I'm totally okay with changing that).
My question: How can i say "if this button is clicked, then change the opacity to 1/put this image on the webpage. else console log try again." Help?
Aucun commentaire:
Enregistrer un commentaire