Sunday 5 June 2011

How to change my index website page automatically?

i want to change the display of my webpage according to time. for instance, if it is 6 pm, i want to display black theme frontpage, and on 01.00 am i want to display a bright theme as my index page.





what code can i use?? any suggestions and helps?? please help me|||by using a small chunk of javascript.





check the system time, then either print %26quot;good%26quot; ...morning/afternoon/evening, dependent on the users time.





or if you want to change the page totally, in addiction to that.. use a URL redirect to another html file. eg..





if time %26gt; 9am %26lt;12 = url redirect %26quot;m-index.html%26quot;


etc





the code is quite easy to find on the web and modify, but i%26#039;m not giving it incase its homework you%26#039;ve been set.|||you will javascript for this.





javascript can use the time function to get the current time on a client%26#039;s browser, and accordingly you can display the time, certain colored backgrounds etc.