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 |
| |||
| 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... |
| Sponsored Links |
| |||
| 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 | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/html-css-javascript-coding-techniques/4951-detect-hour-day-selects-link-they-go-either-day-page-night-page.html | |||
| Posted By | For | Type | Date |
| HTML, CSS and Javascript Coding Techniques [Archive] - Page 2 - DiscussWeb IT Community - Technical Support and Technology Discussions | This thread | Refback | 03-10-2008 10:24 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' | poornima | ASP and ASP.NET Programming | 1 | 03-05-2008 03:12 AM |
| How do you restrict page errors display in the JSP page? | sundarraja | ASP and ASP.NET Programming | 1 | 02-07-2008 11:33 PM |
| How to change aspx page to html page? | S.Vinothkumar | ASP and ASP.NET Programming | 4 | 10-26-2007 11:46 PM |
| ASP.NET FAQ - maintain page scroll position after a page postback? | Archer | ASP and ASP.NET Programming | 1 | 07-24-2007 12:40 AM |
| How can I automatically load another page or reload the same page? | Archer | C# Programming | 0 | 07-16-2007 12:10 AM |