Ver Mensaje Individual
  #6 (permalink)  
Antiguo 06/08/2004, 05:51
Avatar de living
living
 
Fecha de Ingreso: mayo-2004
Mensajes: 1.266
Antigüedad: 20 años
Puntos: 2
Este que te paso es tu mismo código pero modificado así que podrías sustituirlo completamente. Tal como está hecho ahora saldría solamente una tabla arriba del todo. Si quieres que cada una salga en su posición, es decir, la tabla 3 por ejemplo quedaría abajo de la página, me lo dices y modifico en código. Espero que te valga
Código HTML:
<html>
<head>
<title>Tablas</title>
<script>
function showTable(){
var aTablas=new Array();
aTablas[0]="tabla1";
aTablas[1]="tabla2";
aTablas[2]="tabla3";

var numRnd=Math.floor(Math.random()* aTablas.length);
document.getElementById(aTablas[numRnd]).style.display="block";
}
</script>

</head>
<body onLoad="showTable()"> 
<table bgcolor="black" style="display:none" id="tabla1"> 
  <tr> 
    <td><table bgcolor="#eeeeee" rows="2" width="400"> 
        <tr> 
          <td width="80%" align="center"><b><font size="4" color="black">Titulo</font></b></td> 
          <td rowspan="2" align="left"><img src="http://www.kerp.net/grafix/homerscream.gif" width="200" height="150" border="0" /></td> 
        </tr> 
        <tr> 
          <td align="center"> <div style="text-align:justify">texto a mostrar</div></td> 
        </tr> 
    </table></td> 
  </tr> 
</table> 
<table bgcolor="black" style="display:none" id="tabla2"> 
  <tr> 
    <td><table bgcolor="#eeeeee" rows="2" width="400"> 
        <tr> 
          <td width="80%" align="center"><b><font size="4" color="black">Titulo 2</font></b></td> 
          <td rowspan="2" align="left"><img src="http://www.simpsons-screensaver.org/images/1/1.jpg" width="200" height="150" border="0" /></td> 
        </tr> 
        <tr> 
          <td align="center"> <div style="text-align:justify">texto 2 a mostrar</div></td> 
        </tr> 
    </table></td> 
  </tr> 
</table> 
<table bgcolor="black" style="display:none" id="tabla3"> 
  <tr> 
    <td><table bgcolor="#eeeeee" rows="2" width="400"> 
        <tr> 
          <td width="80%" align="center"><b><font size="4" color="black">Titulo 3</font></b></td> 
          <td rowspan="2" align="left"><img src="http://www.1manband.it/images/simpson/Bart/BARTPRAN.GIF" width="200" height="150" border="0" /></td> 
        </tr> 
        <tr> 
          <td align="center"> <div style="text-align:justify">texto 3a mostrar</div></td> 
        </tr> 
    </table></td> 
  </tr> 
</table> 
<p></p> 
</body>
</html> 
__________________
¿Te apasiona el mundo del guión? El portal del guión