jeudi 30 septembre 2021

How can I make if-statement working in JQUERY?

I want make this if/ else work can someone help me? Thanks... Sorry if the question so bad, i am new at here :)

$('input[type=radio]').on("click", function(){var jawaban = $(this).val();});

function optionSelected(){
  if (jawaban = "goodanswer"){
    alert("benar");
  }else{
    alert("salah");
  }
});

Aucun commentaire:

Enregistrer un commentaire