dimanche 24 mars 2019

How to display alert boxes if a checkbox is cheked in Javascript?

I need an alert box when one of the options is checked im using this

function validacion(){
  if (document.getElementById('op1').checked) {
      var x61=document.getElementById('op1').value;
} else {
    var x61="";
}

  alert(" Me gusta : " +x61 );
}

is not working , but i dunno what to do :c




Aucun commentaire:

Enregistrer un commentaire