JavaScript Reference/Javascript Methods/moveRow

Материал из Web эксперт
Версия от 11:22, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"moveRow()" Example

   <source lang="javascript">
   

<html> <body> <script language="JavaScript"> function function1() {

  document.all.myTable.moveRow(-1, 2);

} </script>

First Row  
Second Row  
Third Row  
Fourth Row  

<button onclick="function1();">Move Row</button> </body> </html>


     </source>
   
  


"moveRow()" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+

| Applied_To | <tbody> | | |<tfoot> <thead> | +----------------+--------------------------------------------------------------+ </source>

"moveRow()" Syntax, Parameters and Note

   <source lang="javascript">

Note: Moves row to a new position.

Syntax:

document.all.elementID.moveRow(param1, param2) Parameters:

   param1   Required; the index of the row to move.
   param2   Required; the index of the new position.
   
     
</source>