代码如下
<TABLE style="WIDTH: 450px; TABLE-LAYOUT: fixed" class="obj row20px" cellSpacing=0 cellPadding=0>
<TBODY>
<TR style="POSITION: absolute">
<TH style="WIDTH: 150px; HEIGHT: 0px"></TH>
<TH style="WIDTH: 150px; HEIGHT: 0px"></TH>
<TH style="WIDTH: 150px; HEIGHT: 0px"></TH></TR>
<TR class="ev_skyblue" idd="1000">
<TD class=" " title=100 vAlign=center align=left _cellIndex="0" _clearCell="false" _title="true">100</TD>
<TD class="  " title=Create vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Create</TD>
<TD class=" " title=新问题 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">新问题</TD></TR>
<TR class=" odd_skyblue" idd="1001">
<TD class=" " title=105 vAlign=center align=left _cellIndex="0" _clearCell="false" _title="true">105</TD>
<TD class="  " title="Verified As Bug" vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Verified As Bug</TD>
<TD title=问题验证 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">问题验证</TD></TR>
<TR class=" ev_skyblue" idd="1002">
<TD title=110 vAlign=center align=left _cellIndex="0" _clearCell="false" _title="true">110</TD>
<TD class="  " title="Fix in Progress" vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Fix in Progress</TD>
<TD class=" " title=修正过程中 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">修正过程中</TD></TR>
<TR class=" odd_skyblue" idd="1003">
<TD title=115 vAlign=center align=left _cellIndex="0" _clearCell="false" _title="true">115</TD>
<TD class="   " title="Fix Made" vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Fix Made</TD>
<TD title=已修正 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">已修正</TD></TR>
<TR class=" ev_skyblue   rowselected" idd="1004"><%--class=" ev_dhx_skyblue   rowselected" class="cellselected"--%>
<TD vAlign=center align=left _cellIndex="0" _clearCell="false">120</TD>
<TD title="Verified As Fixed" vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Verified As Fixed</TD>
<TD class=" " title=修正验证 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">修正验证</TD></TR>
<TR class=" odd_skyblue" idd="1005">
<TD vAlign=center align=left _cellIndex="0" _clearCell="false">125</TD>
<TD class=" " title=assign vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">assign</TD>
<TD title=指派 vAlign=center align=left _cellIndex="2" _clearCell="false" _title="true">指派</TD></TR>
<TR class=" ev_skyblue" idd="1006">
<TD vAlign=center align=left _cellIndex="0" _clearCell="false">200</TD>
<TD title=Rejected vAlign=center align=left _cellIndex="1" _clearCell="false" _title="true">Rejected</TD>
<TD vAlign=center align=left _cellIndex="2" _clearCell="false">拒绝</TD></TR>
<TR class="odd_skyblue" idd="1007">
<TD vAlign=center align=left _cellIndex="0" _clearCell="false">205</TD>
<TD vAlign=center align=left _cellIndex="1" _clearCell="false">Not Reproducable</TD>
<TD vAlign=center align=left _cellIndex="2" _clearCell="false">无法重现</TD>
</TR>
</TBODY>
</TABLE>
请注意tr中idd可以为任意属性prop,x,y,nod,t。table可能不是唯一的

解决方案 »

  1.   

                var row=0;
                var tr=$("table tr");
                for(var i=0;i<tr.length;i++)
                if(tr[i].getAttribute("idd")=="1001")row=tr[i].rowIndex;
                alert(row);
      

  2.   

    $('table tr').each(function(index){})
      

  3.   

    shan1119兄的这句
    var tr=$("table tr");
    改为
    var tr = $("TBODY>TR")
      

  4.   


    他是没错的
    有些浏览器不会主动给你生成tbody的
      

  5.   

    row[i]    //表示 第几行  初始i从0开始算row[1].cells[0]   //表示 第二行  第一个 td