我这么写代码能够正确执行..但是IE左下会出错说:
报错: 'cells.0.getElementsByTagName(...).0.innerHTML ' 为空或不是对象
<script language=javascript>
function showzd()
{
var textflie = document.getElementById( "zd ").rows;
var length=textflie.length;
for(var i=1;i <length;i++)
{
var tTime = textflie[i].cells[0].getElementsByTagName( 'span ')[0].innerHTML;
if ( tTime == "主队 " )
{
if (textflie[i].style.display == "none " ) {textflie[i].style.display = "block " } else {textflie[i].style.display = "none " }
}
}
}
</script>
<table width= "610 " border= "0 " cellpadding= "0 " cellspacing= "1 " bgcolor= "#006699 " class= "font12bcenter " id= "zd ">
<tr>
<td height= "20 " onclick= "showzd(); "> <div class= "STYLE1 " > 主队往绩 </div> </td>
</tr>
<% If Not zdwj.EOF Or Not zdwj.BOF Then %>
<%
While ((Repeat2__numRows <> 0) AND (NOT zdwj.EOF))
%>
<tr style= "display:block " >
<td width= "80 " height= "20 " bgcolor= "#FFFFFF "> <span> 主队 </span> </td>
</tr>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
zdwj.MoveNext()
Wend
%>
<tr>
<td height= "20 " bgcolor= "#FFFFFF "> </td>
</tr>
<% else %>
<tr>
<td height= "20 " bgcolor= "#FFFFFF "> 暂无记录 </td>
</tr>
&