I need to show an alert box when one of the options is checked I'm using the following code.
function validacion(){
if (document.getElementById('op1').checked) {
var x61=document.getElementById('op1').value;
} else {
var x61="";
}
alert(" Me gusta : " +x61 );
}
which is not working, but I don't know what to do.