Hintergrund.js
var now = new Date();
var hours = now.getHours();
if (hours >= 0 && hours < 6)
{
{document.write('<body background="rot.jpg">')}
}
if (hours >= 6 && hours < 13)
{
{document.write('<body background="gelb.jpg">')}
}
if (hours >= 13 && hours < 18)
{
{document.write('<body background="gruen.jpg">')}
}
if (hours >= 19 && hours <= 23)
{
{document.write('<body background="blau.jpg">')}
}
HTML-CODE
<HTML>
<HEAD><TITLE>Java
Script - Tip</TITLE>
<script
src="Hintergrund.js"></script>
</body>
</HTML>
|