krishna vala

krishna vala

  • NA
  • 290
  • 73.1k

get automatic value

Jan 2 2019 4:14 AM
how to get data-prefix value of drop down selected value in next textbox using javascript.
 my code is below:
 
<div class="form-group">
<div class="prefix-inner">
<div class="form-group">
<select class="form-control countryData countrySelect" required="" disabled="" >
<option data-prefix="91" selected="selected" value="IN">India</option>
<option data-prefix="62" value="ID">Indonesia</option> 
</select>
</div>
<div class="form-group row">
<div class="col-xs-4">
<input type="text" class="form-control PhonePrefix text-center prefixCountrySel" placeholder="+000" disabled="" >
</div> 
 
 
selected value is india is data-prefix code is 91 is automatically display in below textbox using javascript

Answers (3)