关于对opener使用appendChild的问题
有二个页面:页面f的内容为:
<button onclick="window.open('t.html','','width=800,height=500')">页面</button><textarea id="myTextArea" cols="70" rows="20" name="content">网</textarea>
<script>var alink=document.createElement("a");alink.href="www.baidu.com";alink.innerText="百度";var oTable = document.createElement("table");var oTBody = document.createElement("tbody");var oTR = document.createElement("tr");var oTD = document.createElement("td");oTD.appendChild(alink);oTR.appendChild(oTD);oTBody.appendChild(oTR);oTable.appendChild(oTBody);window.opener.document.getElementById("myTextArea").appendChild(oTable);</script>
var html = '<table><tbody><tr><td><a href="http://www.google.com/">GOOGLE</a></td></tr></tbody></table>';window.opener.document.getElementById("myTextArea").value = html;