<SCRIPT LANGUAGE="JavaScript">
<!--
function changeSpan(o){
var n = o.childNodes[0];
if(n){
if(n.innerText=="30")
n.innerText = "20";
else
n.innerText = "30";
}
}
//-->
</SCRIPT>
<table>
<td id="intCell1" onclick="changeSpan(this);">
<span>30</span></td>
</table>
<!--
function changeSpan(o){
var n = o.childNodes[0];
if(n){
if(n.innerText=="30")
n.innerText = "20";
else
n.innerText = "30";
}
}
//-->
</SCRIPT>
<table>
<td id="intCell1" onclick="changeSpan(this);">
<span>30</span></td>
</table>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script type="text/javascript">
function xlh(){
var intCell = document.getElementById("intCell1");
intCell.getElementsByTagName("span").item(0).firstChild.nodeValue = 40;
}
</script>
</head><body>
<table width="500" border="1" cellspacing="0" cellpadding="0">
<tr>
<td id="intCell1"><span>30</span></td>
</tr>
<tr>
<td><input type="button" value="改变" onclick="xlh();" /></td>
</tr>
</table></body>
</html>
<!--
function changeSpan(){
document.getElementById("sp").innerText="20";
}
//-->
</SCRIPT>
<table>
<td id="intCell1" onclick="changeSpan()">
<span id=sp>30</span></td>
</table>
{
obj.getElementsByTagName("span").item(0).firstChild.nodeValue = 20;
}