function geta()
{  var flag=0
  var radios = document.getElementsByName("ah[]");
  for(i=0;i<radios.length;i++){
    if (radios[i].checked==true){
 var texts=radios[i].value;
          window.opener.document.getElementById("sel_place1").options.add(new Option(texts,i));  
 
     flag=1 
}
  }
   window.close();
}
FF 不报错, IE报错在 window.opener.document.getElementById("sel_place1").options.add(new Option(texts,i)); 

解决方案 »

  1.   

    //在页面上加上<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />//好像IE 8  window.opener.document识别不了。
    //加上上面那个再试试。
      

  2.   

    to daxuejianku:
         试了还是不行!!!
      

  3.   

    window.opener.document.getElementById("sel_place1")
    这个成功获取到了么?
      

  4.   

    用父窗口的Option
    opener.document.getElementById("sel_place1").options.add(new opener.Option(texts,i));
      

  5.   

    你们给的方法我都试过不能通过
    自己己解决   把JS写到主页面,让主页面处理传过来的值并写入SELECT
      

  6.   

    那和用 new opener.Option(texts,i)有何区别
      

  7.   

    to hookee:          你可以用IE8测试下你给的方法。
               
                我再试下你的 。