Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/06/2011, 20:46
Avatar de abimaelrc
abimaelrc
Colaborador
 
Fecha de Ingreso: mayo-2009
Ubicación: En el planeta de Puerto Rico
Mensajes: 14.734
Antigüedad: 15 años
Puntos: 1517
Respuesta: Problema al Agregar TR a un TBODY

Trata algo así
Código HTML:
Ver original
  1. <script language="JavaScript">
  2. function function1() {
  3.    document.getElementById('myTable').insertRow(-1).insertCell(-1).innerText = 'Texto añadido';
  4. }
  5. <table id="myTable" border="1" cellspacing="5" cellpadding="5">
  6.    <tr>
  7.        <td width="100">3</td>
  8.        <td width="100">4</td>
  9.    </tr>
  10.    <tr>
  11.        <td>1</td>
  12.        <td>2</td>
  13.    </tr>
  14. <button onclick="function1();">Add a cell</button>
  15. </body>
  16. </html>

Lo tomé de aquí y lo modifiqué http://www.java2s.com/Code/JavaScrip...RowExample.htm
__________________
Verifica antes de preguntar.
Los verdaderos amigos se hieren con la verdad, para no perderlos con la mentira. - Eugenio Maria de Hostos