jqwuery add allement datalist code example
Example 1: create javascript array from datalist dynamically
var my_list=document.getElementById("months");
alert(my_list.options.length);
Example 2: create javascript array from datalist dynamically
alert(my_list.options[5].value);