Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var d = new Date;
- var time = d.getHours();
- if (time <11)
- {
- alert("Good morning")
- }
- if time (<15)
- {
- alert("<b> Good afternoon </b>")
- }
- if (time <18)
- {
- prompt("Good day")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement