Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to avoid duplicate values in dropdownlist using jquery

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<select class="select">
  <option value="">All</option>
  <option value="com">.com 1</option>
  <option value="net">.net 1</option>
  <option value="com">.com 2</option> <!-- will be removed since value is duplicate -->
  <option value="net">.net 2</option> <!-- will be removed since value is duplicate -->
</select>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #avoid #duplicate #values #dropdownlist #jquery
ADD COMMENT
Topic
Name
6+7 =