Blokert Posted August 8, 2009 Report 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 Report 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 Report Share Posted August 9, 2009 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now