If you are going to use the Date object you will need to define a variable and new Date
var dt=new Datethe you will use this to set what you want. Such as minutes,seconds,year,month,hour
dt.getMinute //or dt.getMonthThat is basically what you do.
You can use the
dt.getBlank
with the following, just replace Blank:
Seconds
Minutes
Hours
Month
FullYear
This only gets it, not write it, to write it we use
document.write(dt)Simple huh?
If you want to take this further you could use if else, to show a different message for the time of day.
Sorry this is so small, there isn't much to explain.


Sign In
Create Account


Back to top









