Código Javascript:
Ver original
<script> function datosTextos() { var textos = \\'CONTENIDO_TABLA|\\'; for (var i=0;i<document.getElementById(\\'TablaDatos\\').rows.length;i++) { for (var j=0;j<4;j++) { textos = textos + document.getElementById(\\'TablaDatos\\').rows[i].cells[j].innerHTML + \\'|\\'; } } alert(textos); } </script> <table class="TablaDatos" id="TablaDatos" border="1"> <tr> <td>1</td> <td>2</td> <td>3</td> <td>4</td> </tr> <tr> <td>5</td> <td>6</td> <td>7</td> <td>8</td> </tr> <tr> <td>9</td> <td>10</td> <td>11</td> <td>12</td> </tr> <tr> <td>13</td> <td>14</td> <td>15</td> <td>16</td> </tr> </table> <input value="Ver valores de la tabla" onclick="datosTextos();" type="button" />