Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/06/2010, 11:25
Avatar de andreshenao
andreshenao
 
Fecha de Ingreso: enero-2009
Ubicación: Medellìn
Mensajes: 417
Antigüedad: 16 años, 2 meses
Puntos: 7
Exclamación imagenes aleatorias

hola tengo este codigo para pasar imagene aleatorias

<html>
<head>
<script language="javascript">

<!--
var fondo = new Array();

fondo[0] = 'uno.jpg';
fondo[1] = 'dos.jpg';

var ele = Math.round(Math.random()*2);

document.write('<img src="');
document.write(fondo[ele]);
document.write('">');
// -->

</script>
</head>
<body bgcolor="beige">
<center>
<H1>Ejemplo de cambio de imagen automático</H1>
<img src="uno.jpg" width="200" name="imagen">
</center>
</body></html>



pero si le coloco este encabezado no funciona.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
que puedo hacer o si alguien tiene otro ejemplo.

Mil gracias
__________________
-----------------
Hosting Medellin
Diseño web medellin