Asked 7 years ago
10 Jun 2017
Views 1368
yogi

yogi posted

how to get value of checked radio button ?

how to get value of checked radio button ?



<input type="radio" value="1"/>Loan no. 1
<input type="radio" value="2"/>Loan no. 2
<select name="payment_category"  id="payment_category" class="form-control"  >	
						<option value="1">Installment</option>
						<option value="2">full payment</option>
 
					</select>
<input type="text" value="" name="amount" />


jquery

 $("#payment_category").change(function(){
      // want to check which radio selected based on that amount will be filled 
});
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

apply class to all radio


<input type="radio" class="radiobox" value="1"/>Loan no. 1
<input type="radio" class="radiobox" value="2"/>Loan no. 2


and try to get checked radio by selector property :checked

		var va=$(".radiobox:checked").val();



Post Answer