Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

add select option javascript

var min = 12,
    max = 100,
    select = document.getElementById('selectElementId');

for (var i = min; i<=max; i++){
    var opt = document.createElement('option');
    opt.value = i;
    opt.innerHTML = i;
    select.appendChild(opt);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #select #option #javascript
ADD COMMENT
Topic
Name
2+7 =