Board logo

標題: 最後更新日期 (中式顯示) [打印本頁]

作者: 蛙    時間: 26-5-2012 10:13     標題: 最後更新日期 (中式顯示)

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

 

 

<SCRIPT LANGUAGE="JavaScript">
   function initArray() { 
      this.length = initArray.arguments.length
      for (var i = 0; i < this.length; i++)
      this[i+1] = initArray.arguments[i]
   }
   var DOWArray = new initArray("星期日","星期一","星期二","星期三",
                                "星期四","星期五","星期六");
   var MOYArray = new initArray("一月","二月","三月","四月",
                                "五月","六月","七月","八月","九月",
                                "十月","十一月","十二月");
   var LastModDate = new Date(document.lastModified);
   document.write("最後更新:");
   document.write(DOWArray[(LastModDate.getDay()+1)],", ");
   document.write(MOYArray[(LastModDate.getMonth()+1)],", ");
   document.write(LastModDate.getDate(),"日 ",(LastModDate.getYear()+00));
   document.write(" ");
</SCRIPT>



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








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