Tuesday, September 13, 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 meHow to change my index website page automatically?
by using a small chunk of javascript.



check the system time, then either print ';good'; ...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 ';m-index.html';

etc



the code is quite easy to find on the web and modify, but i'm not giving it incase its homework you've been set.How to change my index website page automatically?
you will javascript for this.



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

No comments:

Post a Comment