window.opener.document.getElementById("父页面divid").innerText="value";
这样写不行
应该怎么写啊

解决方案 »

  1.   

    parent.frameName.getElementById("").innerText
      

  2.   


    //看错了,应该是
    parent.document.getElementById("父节点ID").innerText=value;
      

  3.   

    不建议用innerText,IE没问题,FF下面好像有些版本不兼容,用innerHTML吧parent.document.getElementById("父节点ID").innerHTML=value;一样可以达到效果,里面还可以放标签如:value='<div id="sub_div">VALUE<'+'/'+'div'+'>';
      

  4.   

    用window.open()打开的子页面中访问父窗口,用window.opener表示父窗口
    在子框架中访问父窗口,用window.parent表示父窗口你用window.opener.document.getElementById("父页面divid").innerText="value";得看你是怎么得到的子页面
      

  5.   

    window.opener.document.getElementById("父页面divid").innerText="value";
    这个的话在子页面中用,这个子页面是父页面window.open打开的。