+ -
当前位置:首页 → 问答吧 → FF不报错,IE报错问题

FF不报错,IE报错问题

时间:2011-11-21

来源:互联网

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)); 

作者: smallapple888   发布时间: 2011-11-21

//在页面上加上

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

//好像IE 8 window.opener.document识别不了。
//加上上面那个再试试。

作者: daxuejianku   发布时间: 2011-11-21

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

作者: smallapple888   发布时间: 2011-11-21

相关阅读 更多