0
변경시 아약스 호출을 트리거하고 몇 가지 값을 가져 오는 콤보 상자가 있습니다. 이 값은 다른 콤보 상자를 만드는 데 사용됩니다.콤보 상자 값을 동적으로로드하는 중
아래의 코드는 동적 콤보의 옵션을 로딩하는데 사용되어있어서 내부
function appendOption(select,option) {
try {
alert(select.innerHTML+"--select--"+option.innerHTML+"--option");
alert(select.add(option, null)); // shows the option tag formed
select.add(option, null); // not adding the option element into the combo
} catch (e) {
alert(e.message());
}
}
개체 선택은 유효한 오브젝트이다.
이 콤보 상자를 만들기 위해 chosen-select
jquery 플러그인을 사용했습니다. 그러나 위의 방법은 정상적인 콤보 (선택되지 않은 선택)의 경우 잘 작동합니다.
아무도 도와 줄 수 있습니까?
귀하의 대답은 매우 효과적이었습니다. 고맙습니다 – Freakyuser