+ 1

[Solved] Please help!!

Why line 45 is wrong? And why the rules box does not disappear on clicking OK button? Please suggest some common rules of a normal quiz. https://code.sololearn.com/WJO76qulDHa1/?ref=app

2nd Jul 2021, 10:51 AM
Shobhit :)
Shobhit :) - avatar
4 Réponses
+ 2
The id of your button is "ok" Not "OK!"
2nd Jul 2021, 10:56 AM
Oma Falk
Oma Falk - avatar
+ 1
Because you don't have any element with id "OK!" see line 40. And as ok is not define no function on click hence no disappearance of ruleBox.
2nd Jul 2021, 11:04 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Line 40 var ok = document.getElementById('ok'); Instead of var ok = document.getElementById('OK!');
2nd Jul 2021, 11:05 AM
Divya Mohan
Divya Mohan - avatar
+ 1
Thank you so much Oma Falk and Divya Mohan, can you please suggest some normal quiz rules as well. Please.
2nd Jul 2021, 11:17 AM
Shobhit :)
Shobhit :) - avatar