JS DOM可不可用子页面来动态添加父页面里的行?

比如说a.html:

b.html
.........

要怎么操作 ? 谢谢。  我用....window.opener.document.getElementById("tab").appendChild()  试了好久都不行。。

搞错了哈 :oops:
可能因为用的是IE,IE中table不支持appendChild.只在Firefox中试过
要不就用DIV之类的模仿TABLE吧
或者document.getElementById("tab").insertRow(0).appendChild(td);

而且window.opener在ie6中也不好用

要不换个别的思路吧

因为两个页面没有父子关系

a.html
[code="html"]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">







[/code]
b.html
[code="html"]


<br> function aa(){<br> td = document.createElement(&quot;td&quot;);<br> td.innerHTML=&quot;abc&quot;;<br> tr = document.createElement(&quot;tr&quot;).appendChild(td);<br> window.opener.document.getElementById(&quot;tab&quot;).appendChild(tr); <br> }




[/code]