Blokert Posted August 8, 2009 Share Posted August 8, 2009 I'm relatively new to scripting, and I was wondering if there was a way to get some content to show only at a certain time. Such as have an alert placed for 12:00 GST, so it will appear at that time. Thanks. Link to comment Share on other sites More sharing options...
Guest FirefoxRocks Posted August 9, 2009 Share Posted August 9, 2009 var d = new Date();var hour = d.getHours();var minutes = d.getMinutes();if(hour===0 && minutes===0){ alert("Hello World!! Mozilla Firefox rocks!!");} Unless I'm wrong about the type comparison, this should work, if it doesn't try putting quotes around the zeros or using == instead of ===. Link to comment Share on other sites More sharing options...
Blokert Posted August 9, 2009 Author Share Posted August 9, 2009 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.