萬年曆
日
一
二
三
四
五
六
您選擇的日期:
步驟 1.將以下程式碼複製至您的<head>與</head>之間即可
步驟 2.將以下程式碼複製至您的<body>與</body>之間即可
<!-------JavaScript萬年曆 START--------> <table border=1 bgcolor="#0066FF" align=center> <tr> <td> <form> <!-- Hidden fields ---> <input type=hidden name=month value=""> <input type=hidden name=year value=""> <input type=hidden name=currMonth value=""> <input type=hidden name=currYear value=""> <!-- End of Hidden fields ---> <p> <input type="button" name="prev" onclick="prevMonth()" value="<<"> <input type="text" size="15" name="monthYear" value=""> <input type="button" name="next" onclick="nextMonth()" value=">>"> </p> <table bgcolor="#64D0FE" align=center border="1" cellpadding="0" cellspacing="0" width="150" bordercolor="#003366"> <tr bgcolor="#64D0FE"> <td width="14%" bgcolor="#CC3366"> <div align="center"><font size="1"><strong>日</strong></font></div> </td> <td width="14%" bgcolor="#0099FF"> <div align="center"><font size="1"><strong>一</strong></font></div> </td> <td width="14%" bgcolor="#0099FF"> <div align="center"><font size="1"><strong>二</strong></font></div> </td> <td width="14%" bgcolor="#0099FF"> <div align="center"><font size="1"><strong>三</strong></font></div> </td> <td width="14%" bgcolor="#0099FF"> <div align="center"><font size="1"><strong>四</strong></font></div> </td> <td width="15%" bgcolor="#0099FF"> <div align="center"><font size="1"><strong>五</strong></font></div> </td> <td width="15%" bgcolor="#CC3366"> <div align="center"><font size="1"><strong>六</strong></font></div> </td> </tr> <tr> <td align="center" width="14%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s1" value=" 1 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s2" value=" 2 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s3" value=" 3 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s4" value=" 4 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s5" value=" 5 "> </td> <td align="center" width="15%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s6" value=" 6 "> </td> <td align="center" width="15%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s7" value=" 7 "> </td> </tr> <tr> <td align="center" width="14%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s8" value=" 8 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s9" value=" 9 "> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s10" value="10"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s11" value="11"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s12" value="12"> </td> <td align="center" width="15%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s13" value="13"> </td> <td align="center" width="15%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s14" value="14"> </td> </tr> <tr> <td align="center" width="14%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s15" value="15"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s16" value="16"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s17" value="17"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s18" value="18"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s19" value="19"> </td> <td align="center" width="15%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s20" value="20"> </td> <td align="center" width="15%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s21" value="21"> </td> </tr> <tr> <td align="center" width="14%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s22" value="22"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s23" value="23"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s24" value="24"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s25" value="25"> </td> <td align="center" width="14%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s26" value="26"> </td> <td align="center" width="15%" bgcolor="#0099FF"> <input type="button" onclick="setDate(this.value);" name="s27" value="27"> </td> <td align="center" width="15%" bgcolor="#CC3366"> <input type="button" onclick="setDate(this.value);" name="s28" value="28"> </td> </tr> <tr> <td align="center" bgcolor="#CC3366"> <input type="button" name="s29" onclick="setDate(this.value);" value="29"> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s30" onclick="setDate(this.value);" value="30"> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s31" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s32" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s33" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s34" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#CC3366"> <input type="button" name="s35" onclick="setDate(this.value);" value=" "> </td> </tr> <tr> <td align="center" bgcolor="#CC3366"> <input type="button" name="s36" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s37" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s38" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s39" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s40" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#0099FF"> <input type="button" name="s41" onclick="setDate(this.value);" value=" "> </td> <td align="center" bgcolor="#CC3366"> <input type="button" name="s42" onclick="setDate(this.value);" value=" "> </td> </tr> </table> </form> <form> <table border=0 cellspacing=1 cellpadding=1> <tr> <td> <b>您選擇的日期:</b> </td> <td align=center> <input type=text size="12" name=dateField> </td> <tr> </table> </form> </td> </tr> </table> <!-------JavaScript萬年曆 END-------->
步驟 3.在<body>標籤中加入下列程式碼
onload="thisMonth()"
關閉本視窗
本站內容屬私人所有 請勿任易轉載 如須轉載 請通知本站
本站所鏈結標題及鍊結內容 皆歸原權利人所有
網站內容如有任何侵權 亦請通知本站刪除 謝謝!
Power by
9 Walker Studio