空の値なしですべての選択オプションを取得し、変更イベントでそれらを複製したい。これは可能ですか?
これは私のコードです:
$(function() {
$("#ddlSecurityQuestions1").change(function() {
var index = $(this).val();
$('#ddlSecurityQuestions2').empty();
$('#ddlSecurityQuestions1 option').clone().appendTo('#ddlSecurityQuestions2');
var otherDropDown=document.getElementById('ddlSecurityQuestions2');
otherDropDown.options.remove(index);
});
});