我有一个弹出窗口,它填充了在父窗口中找到的选择列表。
这是我用于从弹出窗口中填充选择列表的 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。
如果有人可以帮助我找出解决 IE 9 问题的方法,我将不胜感激。
谢谢