Asked 30+ days ago
10 Jun 2017
Views 125

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>
<input type="text" value="" name="amount" />


      // want to check which radio selected based on that amount will be filled 
Mitul Dabhi

Mitul Dabhi
answered Dec 13 '17 20:17

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();

Edit Answer
Post Answer