Creating html select element from json

atualizarSelectTelefone: function(json) { $("#selectTelefone").empty().append(new Option("Selecione", 0)) for(var key in json) $("#selectTelefone").append(new Option(json[key].nmIdentificacao + ' - ' + json[key].dddTelefoneFormatado, json[key].id)); },

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.