Home > DeveloperSection > Forums > Be add the value in dropdown list
Vikas Giri
Vikas Giri

Total Post:13

Posted on    January-29-2011 8:04 AM

 JQuery JQuery 

 1 Reply(s)
 2519  View(s)
Rate this:
I want to add the value in dropdown list by using textbox in jquery
give the syntax in jquery

Awadhendra Tiwari

Total Post:126

Posted on    May-20-2011 8:51 AM


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

Don't want to miss updates? Please click the below button!

Follow MindStick