How can I know which radio button is selected via jQuery?
Answers
Answered by
0
Answer: Use the jQuery :checked selector
<title>jQuery Get Selected Radio Button Value</title>
<script type="text/javascript">
$(document). ready(function(){
$("input[type='button']"). click(function(){
var radioValue = $("input[name='gender']:checked"). val();
if(radioValue){
alert("Your are a - " + radioValue);
kartik78986:
plz mark it as brainleast
Similar questions
Science,
7 months ago
English,
7 months ago
Social Sciences,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Math,
1 year ago