Created
March 23, 2015 13:17
-
-
Save s0ren/ba5d6f0d3129e0da47c1 to your computer and use it in GitHub Desktop.
Tilfældigt billede ved indlæsning af side
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="header"> | |
<img id="logo" src="img/top_banner.png" alt="" draggable="false"> | |
<img class="random" name="rdmImg" src="" alt="" draggable="false"> | |
<script language="javascript"> | |
var x = Math.floor((Math.random() * 5) + 1); | |
x -= 1; | |
var randomimages=new Array() | |
randomimages[0]="img/banner/rdm1.jpg" | |
randomimages[1]="img/banner/rdm2.jpg" | |
randomimages[2]="img/banner/rdm3.jpg" | |
randomimages[3]="img/banner/rdm4.jpg" | |
randomimages[4]="img/banner/rdm6.jpg" | |
document.images.rdmImg.src=randomimages[x]; | |
</script> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment