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
Post a Comment