Board logo

標題: 今天日期 [打印本頁]

作者: 蛙    時間: 18-5-2012 17:49     標題: 今天日期

如不能顯示語法效果可貼去本站語法測試板試看

 

 

 

<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 = "000000";
date = "今天是 " + " " + (today.getMonth() + 1 ) + " 月 " + today.getDate() + " 日 " + day +"";
document.write("<CENTER><FONT COLOR=000000>")
document.write("<CENTER>" + date.fontsize(3) + "</CENTER>");
document.write("</FONT>")
</script>



作者: 蛙    時間: 25-5-2013 16:12     標題: 複製上列語法








歡迎光臨 笨笨網站超級論壇 (http://www.bunbunhk.com/BBS/Discuz/) Powered by Discuz! 6.0.0