+ 1
Javascript quiz part
Help me I'm new to coding I'm trying to learn javascript..in this code I want that whenever someone click on the right answer button will change its color to green and if someone click on wrong answer it will turn to red I have tried but don't know how to do it correctly.. https://code.sololearn.com/W0I0B3W3eGx8/?ref=app
8 Respuestas
+ 4
result() is a function so you should write
onclick = "result()"
document.Elementbyclassname=('btn') should be
document.getElementsByClassName('btn')
+ 1
Wow thankyou mate😍
0
It is now showing an error
0
Thankyou as I have just started learning it I m very confuse of how this works ..and also what you have done is not understandable to me..but what you have done was I wanted to do.