0
Please help me to solve this problem
I need to link my HTML page with Js file by an event wich going to be like this : A quiz that consist of 6 questions and the user has to select one of the choices __When the user click the correction button the correct answer will be in green and the false ones by red —the other button delete is responsible for clearing all the answers of the user https://code.sololearn.com/Wa6A9A2A8a15/?ref=app
1 Réponse
+ 1
When i open your code i get an unexpected identifier error in line 3.
That is because in the array you declared are some strings that are not ended properly. In the "document.getElementById" answer you used " to declare t1 as a string. But you were already in a string. So the correct syntax here would be "document.getElementById(\"t1\") ".
With the backslash you escape the quotation mark. Same thing goes for the document.getElementsByTagNames. Write back if there is anything else. ;)