<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head>
<body align="center">
<table border="1" align="center">
<tbody id="new">
<tr><td width="45pt">a</td><td width="45pt">1</td></tr>
<tr><td>b</td><td>2</td></tr>
</tbody>
</table>
<hr/>
<div align="center">
Name: <input type="text" id="name"></br>
Account: <input type="text" id="account"></br>
Password:<input type="text" id="psd"></br>
<input type="submit" id="sub" value="Submit" onclick="Add()">
</div>
<script type="text/javascript">
function Add(){
var table=document.getElementById("new");
var newTR=document.createElement("tr");
var newTD1=document.createElement("td");
var newText1=document.createTextNode(name.value);
var newTD2=document.createElement("td");
var newText2=document.createTextNode(account.value);
newTD1.appendChild(newText1);
newTD2.appendChild(newText2);
newTR.appendChild(newTD1);
newTR.appendChild(newTD2);
table.appendChild(newTR);
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
</head>
<body align="center">
<table border="1" align="center">
<tbody id="new">
<tr><td width="45pt">a</td><td width="45pt">1</td></tr>
<tr><td>b</td><td>2</td></tr>
</tbody>
</table>
<hr/>
<div align="center">
Name: <input type="text" id="name"></br>
Account: <input type="text" id="account"></br>
Password:<input type="text" id="psd"></br>
<input type="submit" id="sub" value="Submit" onclick="Add()">
</div>
<script type="text/javascript">
function Add(){
var table=document.getElementById("new");
var newTR=document.createElement("tr");
var newTD1=document.createElement("td");
var newText1=document.createTextNode(name.value);
var newTD2=document.createElement("td");
var newText2=document.createTextNode(account.value);
newTD1.appendChild(newText1);
newTD2.appendChild(newText2);
newTR.appendChild(newTD1);
newTR.appendChild(newTD2);
table.appendChild(newTR);
}
</script>
</body>
</html>

