日期:2014-05-16  浏览次数:20299 次

span那里哪儿错了,就是一个简单的点击一次计算一下,怎么第二行的那个显示不出来,找半天了
<html>
<head> <title> 清零 </title> </head>
<script   language= "javascript ">
var   cnt=0;
function   addnubmer()
{
count.innertext=++cnt;

}
function   clearcount()
{
cnt=0;
count.innertext=0;

}
</script>
<body>
<table   border= "1 ">
<tr>
<td   style= "cursor:hand "   onclick= "addnubmer() "> 点击 </td>
<td   style= "cursor:hand "   onclick= "clearcount() "> 清零 </td>
</tr>
<tr>
<td   colspan=2> 这是第 <span   id= "count "> 0 </span> 次点击 </td>
</tr>
</table>
</body>
</html>

------解决方案--------------------
你好,请把 innertext 改成 innerText 
就对了,哈