<html>
<head>
<script type='text/javascript'>
function showTd(){
var nodes = document.getElementsByTagName("td");
for(var i = 0; i < nodes.length; i++) {
var node = nodes[i];
alert(node.childNodes[0].nodeValue);
}
}
function showTitle(){
document.getElementById("myTitle").innerHTML ="<h2>胡曾俊傑</h2>";
}
</script>
</head>
<body>
<input value="showTitle" onclick="showTitle();" type="button"><br>
<input value="showTDValues" onclick="showTd();" type="button"><br>
<div id="myTitle"></div>
<table>
<tbody>
<tr>
<td>EmpID</td>
<td>UserID</td>
<td>UserName</td>
</tr>
<tr>
<td>E0001</td>
<td>Polin</td>
<td>我</td>
</tr>
</tbody>
</table>
</body>
</html>