如何使用Prototype JS在select中插入选项值?

时间:2016-11-22 08:00:59

标签: javascript prototype

这是我的js代码:

 html = "";
 Object.keys(obj).forEach(function(key) {
       html += "<option value='" + obj[key].entity_id + "'>" + obj[key].name + "</option>";
 });
 $('_accountmedical_location').insert({ 'after' : html });

我想知道原型中是否有一个函数在元素中插入一些html代码,如:

$('_accountmedical_location').insert({ 'inside' : html });

我已经有了选项html代码,我只是想把它放在我的选择中。我怎样才能做到这一点 ? thx

0 个答案:

没有答案
相关问题