Just a quick example on how to load different pages depending to night and day!
Hope this would help you up!
If the current time is equals to 6pm, then this code will load the night page!
This should go along with your daypage.html!
Code is as follows:
Code:
<html>
<head>
<title>Day Page</title>
<script type="text/javascript">
<!--
window.onload = function()
{ var today = new Date();
var hour = today.getHours();
if ( hour >= 18 && hour <= 6 ) { window.open('somenightpage.html', target='_self', 'toolbar = yes, scrollbars = yes, location = yes'); return false; } else { return true; }
}
//-->
</script>
</head>
<body>
<p>Day Page!<
</body>
</html>
Bookmarks