<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<table id='mytable'>
<tbody>
<tr>
<td id='mytd'>这里是td的值</td>
</tr>
</tbody>
</table>
<br />
<input type='button' value='绝对路径获取td的值' οnclick='getTdDirectly()' />
<script>
function getTdDirectly(){
var tdobj = document.getElementById('mytd');
tdobj.innerText = "ssss";
}
</script>
</pre><pre name="code" class="html">