<HTML>
<HEAD>
<TITLE> emu's test </TITLE>
</HEAD>
<BODY>
<TABLE border=1>
<TR>
<TD>name</TD>
<TD>gender</TD>
<TD>birthday</TD>
</TR>
<TR onclick="show(this)">
<TD>May</TD>
<TD>female</TD>
<TD>1975/12/31</TD>
</TR>
<TR onclick="show(this)">
<TD>Black</TD>
<TD>male</TD>
<TD>1970/01/01</TD>
</TR>
</TABLE><input name="usrName">
<input name="gender">
<input name="birthday">
<input type=button onclick="update()" value="update">
<SCRIPT LANGUAGE="JavaScript">
<!--
var currentRow;
function show(tr){
usrName.value = tr.cells[0].innerText
gender.value = tr.cells[1].innerText
birthday.value = tr.cells[2].innerText
currentRow = tr;
}
function update(){
if (currentRow == null || currentRow.tagName != "TR") return;
currentRow.cells[0].innerText = usrName.value;
currentRow.cells[1].innerText = gender.value;
currentRow.cells[2].innerText = birthday.value;
}
//-->
</SCRIPT>
</BODY>
</HTML>