time greeting




JavaScript Source Code 3000: Page Details: Time Greeting






























Time Greeting







Don't just welcome your visitors anymore, JavaScript can write good morning, good evening, or good afternoon based on the time the page was loaded, according to the user's system clock. Neat!

















JavaScript Source Code 3000: Page Details: Time Greeting
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- ONE STEP TO INSTALL TIME GREETING:

1. Copy the coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">
<!-- Original: Robert Ison -->
<!-- Web Site: http://www.infosourcetraining.com -->

<! >
<! >

<!-- Begin
datetoday = new Date();
timenow=datetoday.getTime();
datetoday.setTime(timenow);
thehour = datetoday.getHours();
if (thehour > 18) display = "Evening";
else if (thehour >12) display = "Afternoon";
else display = "Morning";
var greeting = ("Good " + display + "!");
document.write(greeting);
// End -->
</script>



<!-- Script Size: 0.79 KB -->










Wyszukiwarka

Podobne podstrony:
THE CLOCK zegar telling the time podawanie godzin i cwiczenia
The Time Machine Wehikuł czasu FullHD 1080p DTS AC3 5 1
glittering greeting
Clawfinger Waste my Time
date time short
The Time of the?rk
date time long
Prepositions of Time
A Tryst in Time
Larry Niven Passing Perry Crater Base, Time Uncertain
Doctor Who Time Crash
HIM One Last Time
Britney Spears Baby One More Time
lap time
Sargent Kayme A Question of Time
finished time
Kydland, Prescott Time to Build and Aggregate Fluctuations

więcej podobnych podstron