在不同时间显示不同的东东 |
|
见过一种特效,在不同季节小时不同的东东,例如:冬季飘雪,秋季就飘落叶了......
<!-- THREE STEPS TO INSTALL DATE IMAGES: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document 3. Download the images and then upload them to your server --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <!-- Original: Jeff Harding ([email protected]) --> <!-- Web Site: http://www.site-ations.com --> <!-- Day images (c): http://www.site-ations.com --> <!-- Month images (c): http://www.bruce-hamilton.com --> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin theDate= new Date(); months = new Array(); days = new Array(); months[1] ="jan.gif"; months[2] ="feb.gif"; months[3] ="mar.gif"; months[4] ="apr.gif"; months[5] ="may.gif"; months[6] ="jun.gif"; months[7] ="jul.gif"; months[8] ="aug.gif"; months[9] ="sep.gif"; months[10] ="oct.gif"; months[11] ="nov.gif"; months[12] ="dec.gif"; days[1] ="1st.gif"; days[2] ="2nd.gif"; days[3] ="3rd.gif"; days[4] ="4th.gif"; days[5] ="5th.gif"; days[6] ="6th.gif"; days[7] ="7th.gif"; days[8] ="8th.gif"; days[9] ="9th.gif"; days[10] ="10th.gif"; days[11] ="11th.gif"; days[12] ="12th.gif"; days[13] ="13th.gif"; days[14] ="14th.gif"; days[15] ="15th.gif"; days[16] ="16th.gif"; days[17] ="17th.gif"; days[18] ="18th.gif"; days[19] ="18th.gif"; days[20] ="20th.gif"; days[21] ="21st.gif"; days[22] ="22nd.gif"; days[23] ="23rd.gif"; days[24] ="24th.gif"; days[25] ="25th.gif"; days[26] ="26th.gif"; days[27] ="27th.gif"; days[28] ="28th.gif"; days[29] ="29th.gif"; days[30] ="30th.gif"; days[31] ="31st.gif"; function printDate() { document.write('<img src="' + months[theDate.getMonth()+1] + '">'); // month document.write('<br>'); document.write('<img src="' + days[theDate.getDate()] + '">'); // day } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <center> <script> printDate(); </script> <p> <font face="arial, helvetica" size="-2"> Day images (c) <a href="http://www.site-ations.com">http://www.site-ations.com</a><br> Month images (c) <a href="http://www.bruce-hamilton.com">http://www.bruce-hamilton.com</a> </font> </center> <!-- STEP THREE: Download the images and upload them to your server --> <!-- http://javascript.internet.com/img/date-images/date-images.zip --> <p><center> <font face="arial, helvetica" size="-2">Free JavaScripts provided<br> by <a href="http://javascriptsource.com">The JavaScript Source</a></font> </center><p> <!-- Script Size: 2.28 KB --> |