Microsoft Office FrontPage 在編輯模式下顯示的年份沒問題(2013.11.05),可是在網頁模式下確變成:113.11.05
程式碼:
<div style="position: absolute; width: 480px; height: 50px; z-index: 1; left: 490px; top: 265px" id="show"></div>
<style type="text/css"> #show{color:"#ffffff"; font-size:40px; font-weight:bold; letter-spacing: 2pt}
</style>
<script language="javascript">
function timeshow(){
dayname= new Array("日","一","二","三","四","五","六");
d=new Date( );
var show="";
var y=d.getYear();
var m=((d.getMonth()*1+1)<10)? "0"+(d.getMonth()*1+1):(d.getMonth()*1+1);
var da=(d.getDate()<10)? "0"+d.getDate():d.getDate();
var dd=(dayname[d.getDay()]<10)? "0"+dayname[d.getDay()]:dayname[d.getDay()];
var hi=(d.getHours()<10) ? "0"+d.getHours():d.getHours();
var mi=(d.getMinutes()<10)? "0"+d.getMinutes():d.getMinutes();
var Si=(d.getSeconds()<10)? "0"+d.getSeconds():d.getSeconds();
show+=y +"." +m +"." +da +"." +dd +" " +hi +":" +mi +":" +Si;
document.getElementById("show").innerHTML=show;
setTimeout("timeshow()",1000);
}
</script></head>
<body onload="timeshow()">
請問有人知道是哪兒錯了嗎?
This entry passed through the Full-Text RSS service — if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers. Five Filters recommends:
留言列表