Javascript Reference
Categories: TABLE

javascript TABLE moveRow( )

@April 17, 2008, 6:47 a.m.
moveRow( ) Firefox/Netscape/NN n/a IE 5(Win) Chrome/Safari/DOM n/a  

moveRow(indexToMove, destinationIndex)


Moves a row in the table from its original location to a different row position. The first parameter is a zero-based index of the row (within the rows collection) you wish to move. The second parameter is the index of the row before which you want to move the row. As a method of the table object, moveRow( )'s index parameters include the first row, which may contain th elements you don't want to move. Invoke the method on the tbody object if you want counting to be just within a table section.

  • A zero-based integer pointing to the row to move.
  • A zero-based integer pointing to the row above which the row is to be moved.
Returned Value

Reference to the moved row.

Powered by Linode.