Created
November 11, 2015 22:03
-
-
Save drunkensouljah/66847a596d0d06e3c0d4 to your computer and use it in GitHub Desktop.
Jeden Tag der Woche ein anderes Bild anzeigen lassen
This file contains hidden or 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
| <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