Be add the value in dropdown list

Total Post:13

Points:91
JQuery 
 2821  View(s)
Ratings:
Rate this:
I want to add the value in dropdown list by using textbox in jquery
give the syntax in jquery
  1. Post:126

    Points:882
    Re: Be add the value in dropdown list

    Hi...

    Use following code snippet to add value in dropdown list using jquery

    function addCombo() {
    var optName = $("#other").attr("value"); $('#category').append("<option value='"+ optName + "'>" + optName + "</option>"); $("#other").attr("value", "");
    }

    Here other is id of drop down list

      Modified On Mar-29-2018 04:12:48 AM

Answer