JS代碼如下:
<script language="javascript">
var mydate = new Date();
var myyear = mydate.getFullYear();
var mymonth = mydate.getMonth() + 1;
var myday = mydate.getDate();
var myhour = mydate.getHours();
var myminute = mydate.getMinutes();
document.write(myyear+"年"+mymonth+"月"+myday+"日"+" "+myhour+":"+myminute);