![]() |
day and night
i was wondering if you could make a script that when it's day i have a light background on my page and when it's night i get a dark backgorund
so something that gets trigered by the time so from 6am to 8pm it's light then from 8pm back to 6am it's dark could this be possible like changing the background picture or something :confused: |
Quote:
|
I know it's possible, but not sure how. There are functions of course to get the time of the user, and according to that time you should be able to change the page however you want.
|
Change the background color of whatever element you like. I presume, possibly incorrectly, you're talking HTML page.
|
Quote:
more info : well say i had a clock on my page or it goes by computer user time when it reaches the right time it will should different backgrounds and things of the page different possible :confused: if so just post the code i'm a computer wiz i no wot i'm doing lol :D |
If you are a computer wiz you should be able to work it out?
|
i'm good at computers but i hate javascript programing cos i get stressed with it so i want help DUR!! i good at other programming but not java
|
The other thing was dont cross post.
|
Hey people i've got a code now that works very well it uses your computer clock for timeing
Code: <script language="JavaScript"> <!-- var now = new Date( ); var hour = now.getHours( ); if (hour >= 4 && hour <= 18) { document.bgColor = "#6699cc"; } else { document.bgColor = "#000066"; } //--> </script> |
We all knew a self-proclaimed wiz was just testing us. Wasn't too stressful now, was it?
|
| All times are GMT -5. The time now is 6:06 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC