Código HTML:
function cont() { var nombre=document.evaluation.name.value; var c=0; if (document.evaluation.radio1[0].checked) { c++; } if (document.evaluation.radio2[2].checked) { c++; } if (document.evaluation.radio3[1].checked) { c++; } alert(nombre + ' ha respondido ' + c + ' preguntas correctas sobre 3'); document.getElementById('name').value(""); }
Código HTML:
alert(nombre + ' ha respondido ' + c + ' preguntas correctas sobre 3'); document.getElementById('name').value("");
gracias saludos