I want to copy value of input fields to my drop down using jQuery. I have four option fields here with respective ids, when user enters any text on following field my drop down get value from it in real time .
My code
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<label>option a</label>
<input type="text" id="opa" size="30" class="text-input" />
<br>
<label>option b</label>
<input type="text" id="opb" size="30" class="text-input" />
<br>
<label>option c</label>
<input type="text" id="opc" size="30" class="text-input" />
<br>
<label>option d</label>
<input type="text" id="opd" size="30" class="text-input" />
<br>
<input type="text" id="a1" name="">
<select name="ra" class="form-control" id="ra">
<option value="" >---Select right option ---</option>
<option id="a" ></option>
<option id="b" ></option>
<option id="c" ></option>
<option id="d" ></option>
</select>