button value in jquery -


$('.next').click(function(){     var buttonval = document.queryselector('input[name="quiz"]:checked').value;     alert(buttonval); }) 

so works, i'd see how syntax in jquery.

when click button class next , in alert notified value of radio button.

i tried writing function in jquery in many ways, alert [object object]. not big of issue, since works, stubborn , can't solve on own.

$('.next').click(function(){     var buttonval = $('input[name="quiz"]:checked')).val();     alert(buttonval); }); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -