This is a discussion on detect hour of the day and selects a link, they go to either a day page or night page within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi all... Can anyone help me how can I detect the hour of the day, and then when someone selects ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi all... Can anyone help me how can I detect the hour of the day, and then when someone selects a link, they go to either a "day" page or a "night" page Thanks in advance... |
|
#2
| |||
| |||
| Hi all... <SCRIPT LANGUAGE = 'JavaScript'> var date = new Date(); var hours = date.getHours(); if ( (hours < 6) || (hours > 18) ) document.write('<A HREF="night.html">click this link<\/A>'); else document.write(<A HREF="day.html">click this link<\/A>'); </SCRIPT> Thanks... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Direct Link To Any Page You Want To In Hotmail | arjkhanna | Search Engines | 2 | 09-16-2009 08:31 PM |
| 'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' | poornima | ASP and ASP.NET Programming | 1 | 03-05-2008 02:12 AM |
| How do you restrict page errors display in the JSP page? | sundarraja | ASP and ASP.NET Programming | 1 | 02-07-2008 10:33 PM |
| How to change aspx page to html page? | S.Vinothkumar | ASP and ASP.NET Programming | 4 | 10-26-2007 10:46 PM |
| ASP.NET FAQ - maintain page scroll position after a page postback? | Archer | ASP and ASP.NET Programming | 1 | 07-23-2007 11:40 PM |
Our Partners |