Ver Mensaje Individual
  #6 (permalink)  
Antiguo 28/05/2004, 05:46
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 23 años, 4 meses
Puntos: 61
No sé si esto te servirá!
Código PHP:
<html>
<
head>

    <
title>Untitled</title>
</
head>

<
body>
<
HTML>
<
HEAD>
<
TITLE></TITLE>
</
HEAD>
<
BODY>

<
TABLE cellSpacing=1 name="t2" cellPadding=1 width="75%" border=1>

<
TR>
<
TD></TD>
<
TD></TD>
<
TD></TD>
</
TR>
</
TABLE>

<
TABLE cellSpacing=1 name="t2" cellPadding=1 width="75%" border=1>

<
TR>
<
TD></TD>
<
TD></TD>
<
TD></TD>
</
TR>
</
TABLE>

<
TABLE cellSpacing=1 name="federico" cellPadding=1 width="75%" border=1>

<
TR>
<
TD></TD>
<
TD></TD>
<
TD></TD>
</
TR>
</
TABLE>

</
BODY>
</
HTML>
<
script>
numero=0;
tablas=document.getElementsByTagName("table").length;
for(
a=0;a<tablas;a++){
if(
document.getElementsByTagName("table")[a].name=="t2"){
tablat2=new Array;
tablat2[numero]=document.getElementsByTagName('table')[a];

numero+=1
}

}
alert(numero);
</script>

</body>
</html> 
Así metes las tablas con mismo name en un array...
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.

Última edición por KarlanKas; 28/05/2004 a las 05:50