Skip to content

Instantly share code, notes, and snippets.

@drunkensouljah
Created November 11, 2015 22:03
Show Gist options
  • Select an option

  • Save drunkensouljah/66847a596d0d06e3c0d4 to your computer and use it in GitHub Desktop.

Select an option

Save drunkensouljah/66847a596d0d06e3c0d4 to your computer and use it in GitHub Desktop.
Jeden Tag der Woche ein anderes Bild anzeigen lassen
<script type="text/javascript"><!--
var imlocation = "images/";
function ImageArray (n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
image = new ImageArray(7)
image[0] = 'Sonntag.gif'
image[1] = 'Montag.gif'
image[2] = 'Dienstag.gif'
image[3] = 'Mittwoch.gif'
image[4] = 'Donnerstag.gif'
image[5] = 'Freitag.gif'
image[6] = 'Samstag.gif'
var currentdate = new Date();
var imagenumber = currentdate.getDay();
document.write('<img src="' + imlocation + image
[imagenumber] + '">');
//--></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment