Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

create javascript array from datalist dynamically

var str=''; // variable to store the options
var month = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
for (var i=0; i < month.length;++i){
str += '<option value="'+month[i]+'" />'; // Storing options in variable
}
Source by www.plus2net.com #
 
PREVIOUS NEXT
Tagged: #create #javascript #array #datalist #dynamically
ADD COMMENT
Topic
Name
1+1 =