要完成此效果需要两个步骤 第一步:把如下代码加入到<head>区域中 <SCRIPT LANGUAGE="JavaScript"> <!-- Begin theDate= new Date(); months = new Array(); days = new Array(); months[1] ="33/jan.gif"; months[2] ="33/feb.gif"; months[3] ="33/mar.gif"; months[4] ="33/apr.gif"; months[5] ="33/may.gif"; months[6] ="33/jun.gif"; months[7] ="33/jul.gif"; months[8] ="33/aug.gif"; months[9] ="33/sep.gif"; months[10] ="33/oct.gif"; months[11] ="33/nov.gif"; months[12] ="33/dec.gif"; days[1] ="33/1st.gif"; days[2] ="33/2nd.gif"; days[3] ="33/3rd.gif"; days[4] ="33/4th.gif"; days[5] ="33/5th.gif"; days[6] ="33/6th.gif"; days[7] ="33/7th.gif"; days[8] ="33/8th.gif"; days[9] ="33/9th.gif"; days[10] ="33/10th.gif"; days[11] ="33/11th.gif"; days[12] ="33/12th.gif"; days[13] ="33/13th.gif"; days[14] ="33/14th.gif"; days[15] ="33/15th.gif"; days[16] ="33/16th.gif"; days[17] ="33/17th.gif"; days[18] ="33/18th.gif"; days[19] ="33/18th.gif"; days[20] ="33/20th.gif"; days[21] ="33/21st.gif"; days[22] ="33/22nd.gif"; days[23] ="33/23rd.gif"; days[24] ="33/24th.gif"; days[25] ="33/25th.gif"; days[26] ="33/26th.gif"; days[27] ="33/27th.gif"; days[28] ="33/28th.gif"; days[29] ="33/29th.gif"; days[30] ="33/30th.gif"; days[31] ="33/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> 第二步:把如下代码加入到<body>区域中 <script> printDate(); </script>
Typhoon Start
Copyright © 2001 All Rights Reserved