0
這是我迄今爲止 我得到有關括號我如何使用for循環做出.append在<select>下拉
var teachers = ['mrs ohara','mr decrenza','mrs poli'];
$('#addteacher').on('click',function(){
$('#home').hide();
console.log();
$('#home').append('<select id = "teacherdropdown"><option>heloo</option></select>');
for (var i = 0;i++;i<teachers.length){
$('#teacherdropdown').append("<option value = "+teachers[i]+">"+teachers[i]+"</option>");
}
})
請注意引用'
相關問題