Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/02/2002, 07:13
bet
 
Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Imagen aleatoria por favor

El siguiente código está tomado de <a href='ir.asp?http://www.webtutorial.com.ar/javascript/' target='_blank'>http://www.webtutorial.com.ar/javascript...</a>

<pre>
&lt;!-- Copiar dentro del tag BODY --&gt;

&lt;script language=&quot;javascript&quot;&gt;

&lt;!--
function VecImagenes()
{
n=0;
this[n++]=&quot;01.jpg&quot;;
this[n++]=&quot;02.jpg&quot;;
this[n++]=&quot;03.jpg&quot;
this.N=n;
}
var Imagenes=new VecImagenes();
src= Imagenes[ Math.floor(Math.random() * Imagenes.N) ] ;
document.write(&quot;&lt;IMG SRC=&quot;+src+&quot;&gt;&quot;);
//--&gt;

&lt;/script&gt;
</pre>

<hr noshade size=1 color="#000000"><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE]