Javascript 从下拉列表sap ui5 IE8中销毁列表项元素

Javascript 从下拉列表sap ui5 IE8中销毁列表项元素,javascript,internet-explorer-8,sapui5,Javascript,Internet Explorer 8,Sapui5,我有一个下拉框。它使用列表项填充列表,每个列表项由id标识。 e、 g 同样,我还有两个列表项 但现在我的问题是,我想通过销毁这些项目并添加具有相同id的项目来清除此列表 我有工作代码,但它只在Chrome中工作 if ( document.getElementById('curr_1') != null) sap.ui.getCore().byId("curr_1").destroy(); 但是上面的代码在IE8(InternetExplorer8)中不起作用 有人能帮我查一下密码吗 我尝试

我有一个下拉框。它使用列表项填充列表,每个列表项由id标识。 e、 g

同样,我还有两个列表项

但现在我的问题是,我想通过销毁这些项目并添加具有相同id的项目来清除此列表

我有工作代码,但它只在Chrome中工作

if ( document.getElementById('curr_1') != null) sap.ui.getCore().byId("curr_1").destroy();
但是上面的代码在IE8(InternetExplorer8)中不起作用

有人能帮我查一下密码吗

我尝试了很多代码

if ( document.getElementById("curr_1") != null) {
     var elem = document.getElementById("curr_1");
     elem.remove(elem.selectedIndex); 
}

但没有一个成功。请帮忙

谢谢
萨提斯

你能解决这个问题吗?没有。。我改变了我的实施方法。。我正在使用bind和unbind items属性添加和删除列表中的项
if ( document.getElementById("curr_1") != null) {
     var elem = document.getElementById("curr_1");
     elem.remove(elem.selectedIndex); 
}
if ( document.getElementById("curr_ch") != null) {
    var select = document.getElementById("curr_1");
    select.remove();
}