I have this form
What i need to to do is to change the color of the form's background to either red if it's wrong or green if it's right, when the "check answer" is clicked.
this is what i have so far:
Javascript
function chagecolor()
{
var changec = document.getElementById("answer")
if (changec == "BURJ KHALIFA")
{
changec.style.backgroundColor = '#F40320';
}
else
{
changec.style.backgroundColor = '#03C13D';
}
HTML
<hr>
What's the tallest building in the world in 2022? <!--BURJ KHALIFA-->
<form >
<input style="text-transform: uppercase;" type="text" id="answer" name="answer">
<input onclick="changecolor()" id="turnon" type="submit" value="Check Answer">
Can someone point me on the right direction Thanks

if (changec.value == "BURJ KHALIFA")function chagecolor()missing ann?