操作流程如下:


代码如下:
<html>
<head>
<style type="text/css">
table, td, th
{
border:1px solid black;
border-collapse:collapse;
}
</style>
<script language="JavaScript">
function changColor()
{
document.getElementById("td1").style.backgroundColor="#FF9900";
}
</script>
</head>
<form name="form1">
<table border="1" width=100 height=50 name="table1">
<tr>
<td width="50" height="50" id="td1" onclick="changColor()">click </td>
<td width="50" height="50"> </td>
</tr>
</table>
</form>
</html>