Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

options select from array

var videoSrcArr = new Array("option1","option2","option3","option4","option5"),
    selectEl = document.getElementById('rec_mode');


for(var i = 0; i < videoSrcArr.length; i++){
    selectEl.options.add(new Option(videoSrcArr[i], videoSrcArr[i]));
}                              
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #options #select #array
ADD COMMENT
Topic
Name
9+3 =