Banner Rotativo com % definido
Olá,
Estou precisando criar uma rotação de 4 banner's com tempo de exibição, por exemplo :
print banner a 70% of the time a page is loaded
print banner b (a flash ad) 20% of the time a page is loaded
print banner c 5% ""
print banner d 5% ""
Bem tentei desta maneira mas, não esta funcionando.. alguém tem alguma ideia de como fazer ?
<script language="JavaScript">var rand=Math.random();if(rand<0.70){document.write("<img src=banner1.jpg");}else if(rand<0.20){document.write("<embed src=banner5.swf width=468 height=60");}else if(rand<0.5){document.write("<img src=banner2.jpg");}else{document.write("<img src=banner3.jpg");}</script>abraço a todos....
Omar
Discussão (1)
Carregando comentários...