Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Swap a select text with javascript

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<select id="se1">
  <option value="1">DOG</option>
  <option value="2">CAT</option>
  <option value="3">BIRD</option>
</select>
<button onclick="swap()">SWAP</button>
<select id="se2">
  <option value="4">DOG</option>
  <option value="5">CAT</option>
  <option value="6">BIRD</option>
</select>
 
PREVIOUS NEXT
Tagged: #Swap #select #text #javascript
ADD COMMENT
Topic
Name
5+4 =