Sci-fi youth novel with a young female protagonist who is watching over the development of another planet. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. jquery add select option value and text; how to add options to select in jquery; add select option jquery; append array javascript on select tag ; Appending the option element using jquery each function; Learn how Grepper helps you improve as a Developer! var options = $ ('#example').attr ('options'); options [options.length] = new Option ('Foo', 'foo', true, true); Adding multiple options Is there a penalty to leaving the hood up for the Cloak of Elvenkind magic item? How can I fit equations with numbering into a table? Use the following snippet to populate a select box with a key value pair. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. </b> <p> Select one from the given options: <select id="select1"> <option value="free">Free</option> <option value="basic">Basic</option> </select> </p> <p> Click the button below to add one option to the select box. How do you remove all the options of a select box and then add one option and select it with jQuery? Using jQuery Object In this case, we create an object for option tag and append it to select element. . Find centralized, trusted content and collaborate around the technologies you use most. Let's see the script Is atmospheric nitrogen chemically necessary for life? The first method is appending the option tag to the select box. jquery append html-select Share Follow edited Sep 16 at 11:50 aynber 21.5k 8 50 59 asked Jun 4, 2014 at 17:28 jQuery append