A friend in IECN asked how to obtain the row number and column number of a cell in the table. He can use rowIndex and cellIndex to obtain the row number and column number.
For more information, see the following code.
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Strict // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml" lang = "gb2312"> <pead> <title> Get rowIndex and cellIndex in table </title> <meta http-equiv = "content-type" content = "text/html; charset = gb2312 "/> <meta name =" generator "content =" editplus "/> <meta name =" author "content =" fengyan, cnlei.y.l@gmail.com "/> <meta name =" keywords "content =" rowIndex, cellIndex "/> </pead> <body> <table id =" MyTable "border =" 1 "> <tbody> <tr> <td> Row 1 column 1 </td> <td> Row 1 column 2 </td> <td> Row 1 column 3 </td> </tr> <td> Row 2 column 1 </td> <td> Row 2 column 2 </td> <td> Row 2 column 3 </td> </tr> <td> Row 3 column 1 </td> <td> Row 3 Column 2 </td> <td> Row 3 column 3 </td> </tr> </tbody> </table> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]