<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>时代Java与您共同学习(NowJava.com)</title>
<style>
table,th,td{
border:1px solid black;
}
</style>
</head>
<body>
<h3>访问 TH 元素</h3>
<table>
<tr>
<th id="myTh">Name</th>
</tr>
<tr>
<td>John</td>
</tr>
</table>
<p>点击按钮改变 TH 元素的文本。</p>
<button onclick="myFunction()">尝试一下</button>
<p id="demo"></p>
<script>
function myFunction(){
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。