Possible Duplicate:
How to get current date in JavaScript
How can i Get the time out of my browser whit using javascript? This do I need to make a comparison in my script.
Possible Duplicate:
How to get current date in JavaScript
How can i Get the time out of my browser whit using javascript? This do I need to make a comparison in my script.
currentTime = new Date();
time = currentTime.getTime();
hours = currentTime.getHours();
etc
You can use the Date object to get the current time:
var currentTime = new Date();