I'm trying to validate the marked response on a form. The intention is to create a multiple-choice question where if the marked item is correct it presents a response, if not, that presents another message. The right answer appears to me, but the wrong one does not. What could be wrong? Thanks!
Javascript
resp_a = document.getElementById("01_a").checked = false;
resp_b = document.getElementById("01_b").checked = false;
resp_c = document.getElementById("01_c").checked = true;
resp_d = document.getElementById("01_d").checked = false;
resp_e = document.getElementById("01_e").checked = false;
switch(){
case resp_a:
document.getElementById("resp_01").innerHTML = "Você errou, tente novamente!";
break;
case resp_b:
document.getElementById("resp_01").innerHTML = "Você errou, tente novamente!";
break;
case resp_c:
document.getElementById("resp_01").innerHTML = "Você acertou!";
break;
case resp_d:
document.getElementById("resp_01").innerHTML = "Você errou, tente novamente!";
break;
case resp_e:
document.getElementById("resp_01").innerHTML = "Você errou, tente novamente!";
break;
}