查看完整版本: 簡單美觀日曆

17-5-2012 21:03

簡單美觀日曆

<script language="JavaScript">
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星 期 日"
if(today.getDay()==1) day = "星 期 一"
if(today.getDay()==2) day = "星 期 二"
if(today.getDay()==3) day = "星 期 三"
if(today.getDay()==4) day = "星 期 四"
if(today.getDay()==5) day = "星 期 五"
if(today.getDay()==6) day = "星 期 六"
document.fgColor = "000066";
date = " 西元 " + (today.getYear()-11) + " 年"+ (today.getMonth() + 1 ) + " 月 " + today.getDate() + " 日 " + day +"";
document.write("<TABLE BORDER=0 width=80 cellspacing=0 cellpadding=0 bgcolor=#B0D0F8><TR><TD ALIGN=CENTER><FONT COLOR=000066>")
document.write(+ (today.getYear()) + "年");
document.write((today.getMonth()+1) + "月</FONT></TD></TR>")
document.write("<TR><TD ALIGN=CENTER><FONT SIZE=6 FACE=ARIAL COLOR=000066><b>"+ today.getDate() + "</b></FONT><FONT COLOR=000066> 日 </FONT></TD></TR>")
document.write("<TR><TD ALIGN=CENTER bgcolor=000066><FONT COLOR=ffff00>"+ day +"</FONT></TD></TR>")
document.write("</TABLE>")
</script>


<BR><BR><BR><BR>



<FONT color=blue>
<P><FONT color=#0000ff size=3>如不能顯示語法效果可貼去本站</FONT><A href="http://www.bunbun000.com/html/index.htm" target=_blank><FONT color=red size=3>語法測試板</FONT></A><FONT color=#0000ff size=3>試看</FONT></P></FONT>
<P><FONT color=blue></FONT>&nbsp;</P>
<P><FONT color=blue></FONT>&nbsp;</P>
<P><FONT color=blue></FONT>&nbsp;</P>
<P><FONT color=blue>&lt;script language="JavaScript"&gt; <BR>var enabled = 0; today = new Date(); <BR>var day; var date; <BR>if(today.getDay()==0) day = "星 期 日" <BR>if(today.getDay()==1) day = "星 期 一" <BR>if(today.getDay()==2) day = "星 期 二" <BR>if(today.getDay()==3) day = "星 期 三" <BR>if(today.getDay()==4) day = "星 期 四" <BR>if(today.getDay()==5) day = "星 期 五" <BR>if(today.getDay()==6) day = "星 期 六" <BR>document.fgColor = "000066";<BR>date = " 西元 " + (today.getYear()-11) + " 年"+ (today.getMonth() + 1 ) + " 月 " + today.getDate() + " 日 " + day +""; <BR>document.write("&lt;TABLE BORDER=0 width=80 cellspacing=0 cellpadding=0 bgcolor=#B0D0F8&gt;&lt;TR&gt;&lt;TD ALIGN=CENTER&gt;&lt;FONT COLOR=000066&gt;") <BR>document.write(+ (today.getYear()) + "年"); <BR>document.write((today.getMonth()+1) + "月&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;") <BR>document.write("&lt;TR&gt;&lt;TD ALIGN=CENTER&gt;&lt;FONT SIZE=6 FACE=ARIAL COLOR=000066&gt;&lt;b&gt;"+ today.getDate() + "&lt;/b&gt;&lt;/FONT&gt;&lt;FONT COLOR=000066&gt; 日 &lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;") <BR>document.write("&lt;TR&gt;&lt;TD ALIGN=CENTER bgcolor=000066&gt;&lt;FONT COLOR=ffff00&gt;"+ day +"&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;") <BR>document.write("&lt;/TABLE&gt;") <BR>&lt;/script&gt;</FONT><BR><BR></P>

25-5-2013 16:11

複製上列語法

<form name="copy">
<textarea cols="40" name="txt" rows="4" style="BACKGROUND-COLOR:#ffffff; COLOR:#000000; FONT-SIZE:9pt">
<script language="JavaScript">
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星 期 日"
if(today.getDay()==1) day = "星 期 一"
if(today.getDay()==2) day = "星 期 二"
if(today.getDay()==3) day = "星 期 三"
if(today.getDay()==4) day = "星 期 四"
if(today.getDay()==5) day = "星 期 五"
if(today.getDay()==6) day = "星 期 六"
document.fgColor = "000066";
date = " 西元 " + (today.getYear()-11) + " 年"+ (today.getMonth() + 1 ) + " 月 " + today.getDate() + " 日 " + day +"";
document.write("<TABLE BORDER=0 width=80 cellspacing=0 cellpadding=0 bgcolor=#B0D0F8><TR><TD ALIGN=CENTER><FONT COLOR=000066>")
document.write(+ (today.getYear()) + "年");
document.write((today.getMonth()+1) + "月</FONT></TD></TR>")
document.write("<TR><TD ALIGN=CENTER><FONT SIZE=6 FACE=ARIAL COLOR=000066><b>"+ today.getDate() + "</b></FONT><FONT COLOR=000066> 日 </FONT></TD></TR>")
document.write("<TR><TD ALIGN=CENTER bgcolor=000066><FONT COLOR=ffff00>"+ day +"</FONT></TD></TR>")
document.write("</TABLE>")
</script>
</textarea><br>
<input onclick="javascript:this.form.txt.focus();this.form.txt.select();" type="button" value="全選">
</form>

<br>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-4078143172638881";
/* 336X280 */
google_ad_slot = "3268225205";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
頁: [1]
查看完整版本: 簡單美觀日曆