Reputation: 1
I'm having issues in changing the background colour of the page based on the score obtained in the quiz.
I attempted something like this:
var scorecolour;
if (actualchoices[q] >= 1) {
scorecolour=document.getElementById("main");
scorecolour.style.backgroundcolor="green"
}
else {
scorecolour=document.getElementById("main");
scorecolour.style.backgroundcolor="red"
}
I'm pretty new to this website, if there is anything else that is needed just ask I guess :)
Thank you guys
Upvotes: 0
Views: 79