JavaScript Source Code 3000: Page Details: Launch Date
Launch Date
Displays one of two messages after comparing the current date on the user's computer to a date that you determine, such as a product or web site launch date. A 'before' or 'after' message can be customized with your own HTML code, including images. Short!
launchCheck();
JavaScript Source Code 3000: Page Details: Launch Date 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!!!
<!-- TWO STEPS TO INSTALL LAUNCH DATE:
1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript"> <!-- Original: Ronnie T. Moore --> <!-- Web Site: JavaScript Source Code 3000 -->
<! > <! >
<!-- Begin function launchCheck() { var today = new Date(); // today var date = new Date("June 1, 2000"); // your launch date
if (today.getTime() > date.getTime()) { // on or after launch date document.write('<a href="after.html"><img src="after.gif"></a>'); } else { // before launch date document.write('<a href="before.html"><img src="before.gif"></a>'); } } // End --> </script> </HEAD>
<!-- STEP TWO: Copy this code into the BODY of your HTML document -->