Returns the index of a table row or column TD is a column, TR is a row: <script type= "Text/javascript" >$ (document). Ready (function () {$ ("table TD"). BIND ("click" , function () {var index = $ (this). Parent (). index (); alert (index);//indicates the index of the row in which it is located. If you want the index of the column, remove the parent ()}); </script> returns closest the nearest table element of the specified element, var tableId = $ (' input[class= "Daobubili"] "). Closest (" table "). attr (" id "); Get the table index (); jquery finds the TD column for the specified table $ ("#tab tr"). Find ("Td:eq (7)"); Special form template Remember to set thead so that traversing tbody TR will not have a header line. <table> <thead> <tr> <th style= "Display:none" > Hide </th> <th width = "5%" > Serial number </th> </tr> </thead> <tbody> <tr moban style= "Height : 33px;display:none "> </tr> <tbody></table>
jquery Operation Table Summary