Return to Snippet

Revision: 51011
at September 12, 2011 08:55 by Jotape


Initial Code
<script type="text/javascript">
var banner= new Array()
banner[0]="Image01URL"
banner[1]="Image02URL"
banner[2]="Image03URL"
banner[3]="Image04URL"
banner[4]="Image05URL"
banner[5]="Image06URL"
banner[6]="Image07URL"
banner[7]="Image08URL"
banner[8]="Image09URL"
banner[9]="Image10URL"
var random=Math.floor(10*Math.random());
document.write("<style>");
document.write("body {");
document.write(' background:url("' + banner[random] + '") no-repeat center top;');
document.write(" }");
document.write("</style>");
</script>

Initial URL

                                

Initial Description
Alterar Background randomicamente.

Initial Title
Alternate Background

Initial Tags
javascript

Initial Language
JavaScript