window.open(页面2)在页面2内 onclick为页面1增加行和列PS:一个页面的话:
<html>
<head>
<script>
    function Add()
    {
    var tbody1 = document.getElementById("tbody1");
    var tr = document.createElement("<tr>");
    var td = document.createElement("<td>");
    var text = document.createTextNode("新增的行");
    td.appendChild(text);
    tr.appendChild(td);
        tbody1.appendChild(tr);
    }
</script>
</head>
<body>
<table id="table1" border=1>
    <tbody id="tbody1">
</table>
<input type="button" onclick="Add()" value="Add">
</body>
</html>

解决方案 »

  1.   

    document.createElement(" <tr>")不是这么用的吧?
    document.createElement("tr");
      

  2.   

    window.open('B.html', 'newwindow', 'height=420,width=800,top=' + (screen.AvailHeight - 300) / 2 + ',left=' + (screen.AvailWidth - 300) / 2 + ',toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');B页面
    <html> 
    <head></head> 
    <body> 
    <input type="button" onclick="Add()" > 
    </body> 
    </html> 
      

  3.   

    在页面2内 onclick为页面1增加行和列 可以不?