1

親ウィンドウにある選択リストを作成するポップアップがあります。

ポップアップから選択リストを作成するための私の 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 の問題を解決する方法を見つけるのを手伝ってくれたら幸いです。

ありがとう

4

1 に答える 1

2

この記事を試してください

http://social.msdn.microsoft.com/Forums/en/iewebdevelopment/thread/92df3532-7497-41cb-b3bf-0f8cab7451d1

于 2012-05-04T10:50:47.307 に答える