Ver Mensaje Individual
  #7 (permalink)  
Antiguo 30/01/2009, 09:06
Avatar de ElJavista
ElJavista
Colaborador
 
Fecha de Ingreso: marzo-2007
Ubicación: Lima Perú
Mensajes: 2.231
Antigüedad: 17 años, 1 mes
Puntos: 67
Respuesta: banner aleatorio con html

Este es el código, pero no funciona en Internet Explorer y no sé porque.

Código:
var urls = new Array();
urls[0] = 'http://impes.tradedoubler.com/imp?type(js)g(17064072)a(1607645)' + new String (Math.random()).substring (2, 11);
urls[1] = 'http://impes.tradedoubler.com/imp?type(js)g(17064064)a(1607645)' + new String (Math.random()).substring (2, 11);
urls[2] = 'http://impes.tradedoubler.com/imp?type(img)g(17713316)a(1607645)' + new String (Math.random()).substring (2, 11);

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

if (n < 2) document.write('<sc'+'ript type="text/javascript" src="'+urls[n]+'" charset="ISO-8859-1"></sc'+'ript>');
else document.write('<a href="http://clk.tradedoubler.com/click?p=88617&a=1607645&g=17713316" target="_BLANK"><img src="'+urls[n]+'" border=0></a>');
Espero que te sirva.