28,409
社区成员




<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页 </title>
</head>
<body>
<script>
function AddRow(name,age,addr)
{
var tb=document.getElementById("tbody");
var tr=tb.insertRow();
var td=tr.insertCell();
td.innerHTML=name;
td=tr.insertCell();
td.innerHTML=age;
td=tr.insertCell();
td.innerHTML=addr;
}
</script>
<table border='1px'>
<tr><td>姓名</td><td>年龄</td><td>地址</td></tr>
<tbody id="tbody"></tbody>
</table>
<!-----下面使用showModalDialog的第2个参数来传递当前页的Arr数组供aaa.htm使用-------->
<input type="button" value="Add" onclick="window.open('add.htm')"/>
</body>
</html>
<input type="button" onclick="ToP()" value="提交" /><br />
姓名:<input type="text" id="name"/><br />
年龄:<input type="text" id="age"/><br />
地址:<input type="text" id="addr"/><br />
<script>
function ToP()
{
opener.AddRow(document.getElementById("name").value,document.getElementById("age").value,document.getElementById("addr").value);
window.close();
}
</script>