dropdown list jquery -


i have array following value,

[['6','ltr'],['7','ml']]

how can use array fill drop down list using jquery

$(function() {     var arr = [['6', 'ltr'], ['7', 'ml']];     var html = "<select>";     $.each(arr,function(i, item) {         html += '<option value="' + item[0] + '">' + item[1] + '</option>';     });     html += "</select>";     $('#select').html(html); }); 
$(function() {     var arr = [['6', 'ltr'], ['7', 'ml']];     $.each(arr,function(i, item) {         alert(item[0] + ' ' + item[1]);     }); }); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -