javascript - populate dropdownlist with an array -


i have array var mylist = new array(); , have drop down

@html.dropdownlist("yourlist", model.yourlist).  

how can fill dropdownlist using javascript.

var mylist = new array();  (i=0; i<mylist.length; i++) {     master.options[master.options.length]=new option(mylist[i].text, mylist[i].value); } 

http://www.javascriptkit.com/javatutors/selectcontent.shtml


Comments

Popular posts from this blog

actionscript 3 - TweenLite does not work with object -

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

c# - Global Variables vs. ASP.NET Session State -