Javascript 通过弹出窗口在父窗口中填充selectbox

Javascript 通过弹出窗口在父窗口中填充selectbox,javascript,Javascript,我有一个弹出窗口,填充父窗口中的选择列表 下面是我的javascript代码,用于填充弹出窗口中的选择列表: function add_2_list(element) { var destinationList =window.opener.document.getElementById('selectlist_id'); var select_index = destinationList.length; destinationList.options[select_i

我有一个弹出窗口,填充父窗口中的选择列表

下面是我的javascript代码,用于填充弹出窗口中的选择列表:

function add_2_list(element) {
    var destinationList =window.opener.document.getElementById('selectlist_id');
    var select_index = destinationList.length;
    destinationList.options[select_index] = new Option(element, element, true) 
}
这段代码在mozilla firefox上非常有效,但在Internet Explorer 9上似乎不起作用

如果有人能帮我找到一个解决IE9问题的方法,我将不胜感激

谢谢

试试这篇文章

var option=新选项(元素,元素,真);选项。添加(选项,选择索引);