This tutorial shows exactly what you need to do: Add options to an HTML select box with javascript
Basically:
daySelect = document.getElementById('daySelect');
daySelect.options[daySelect.options.length] = new Option('Text 1', 'Value1');
More Related Contents:
- Can I apply the required attribute to fields in HTML5?
- Javascript to sort contents of select element
- Select a complete table with Javascript (to be copied to clipboard)
- How can I disable an in a based on its value in JavaScript?
- Links in dropdown options
- How to choose a weighted random array element in Javascript?
- jQuery prevent change for select
- How to open the select input using jquery
- key-value pairs in ng-options
- Redirect form to different URL based on select option element
- Trigger a select form element to show its options (open drop down options list) with Javascript
- How to get selected value of a dropdown menu in ReactJS
- How can I create unique IDs with JavaScript?
- SVG to Canvas with d3.js
- Can I apply the required attribute to fields in HTML?
- Javascript select onchange=’this.form.submit()’
- Show select dropdown in jQuery? [duplicate]
- compare strings and get end difference
- How do you force your Javascript event to run first, regardless of the order in which the events were added?
- what happens when a Promise never resolves? [duplicate]
- typeof returning “unknown” in IE
- Remove everything within script and style tags
- JQuery AutoComplete, manually select first searched item and bind click [duplicate]
- D3: How do I set “click” event and “dbclick” event at the same time?
- round off decimal using javascript
- What does this JavaScript/jQuery syntax mean?
- Google maps responsive resize
- Chrome console clear assignment and variables
- Getting a sticky header to “push up”, like in Instagram’s iPhone app using CSS and jQuery
- Variation of e.touches, e.targetTouches and e.changedTouches