获取列数很容易,用cellIndex就可以了,可是用rowIndex获取不了行数,怎么弄?<TABLE bgColor=yellow border=2>
<TBODY>
<TR>
<TH onclick=alert(this.cellIndex)>Title</TH>
<TH onclick=alert(this.cellIndex)>Artist</TH></TR>
<TR>
<TD onclick=alert(this.cellIndex)>Empire Burlesque</TD>
<TD onclick=alert(this.cellIndex)>Bob Dylan</TD></TR>
<TR>
<TD onclick=alert(this.cellIndex)>Picture book</TD>
<TD onclick=alert(this.cellIndex)>Simply Red</TD></TR>
<TR>
<TD onclick=alert(this.cellIndex)>Red</TD>
<TD onclick=alert(this.rowIndex)>The Communards</TD></TR>
<TR>
<TD onclick=alert(this.cellIndex)>Unchain my heart</TD>
<TD onclick=alert(this.cellIndex)>Joe Cocker</TD></TR></TBODY></TABLE>