Page aléatoire
<script type="Text/Javascript">
var NombrePages = 2;
var page = new Array(NombrePages+1);
page[0]="Lien page html 1";
page[1]="Lien page html 2";
page[2]="Lien page html 3";
function PageRandom(){
var scriptRandom = -1;
while (scriptRandom < 0 || scriptRandom > NombrePages || isNaN(scriptRandom)){
scriptRandom = parseInt(Math.random()*(NombrePages+1));
}
return scriptRandom;
}
affichage = PageRandom();
AffichagePage = page[affichage];
window.location=(AffichagePage);
</script>