✔ 最佳答案
用javascript你ok嗎??圖層框是說放在div嗎??
2008-08-01 16:13:10 補充:
在body標籤打像下面
<body onload=timeshow()>
在body中間加上...div位置要如何移動隨你高興
<div id=show />
在<head>~</head>中貼
<script language="javascript">
function timeshow(){
dayname= new Array("日","ㄧ","二","三","四","五","六");
d=new Date();
var show="";
show =d.getYear() "-" d.getMonth() 1 "-" d.getDate() "." dayname[d.getDay()] " " d.getHours() ":" d.getMinutes() ":" d.getSeconds();
document.getElementById("show").innerHTML=show;
}</script>
以上script的<>是用全型...記得改為半型喔
2008-08-01 16:14:09 補充:
div圖層移動你應該會吧....不用我在多說明了....
2008-08-01 16:19:25 補充:
show+=d.getYear()+"-"+(d.getMonth()*1+1)+"-"+d.getDate()+"."+dayname[d.getDay()]+" "+d.getHours()+":"+d.getMinutes()+":"+d.getSeconds();
document.getElementById("show").innerHTML=show;
把上面改成這一段並且+號是全型要改為半型喔
2008-08-01 16:21:41 補充:
是show+=這段改就好...不要全改..
2008-08-01 18:54:02 補充:
把function全部換掉
2008-08-01 18:54:17 補充:
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();
2008-08-01 18:54:25 補充:
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();
2008-08-01 18:54:30 補充:
show+=y+"-"+m+"-"+da+"."+dd+""+hi+":"+mi+":"+Si;
document.getElementById("show").innerHTML=show;
setTimeout("timeshow()",1000);
}
2008-08-01 18:54:43 補充:
以上加號是全型改為半型
2008-08-02 17:35:23 補充:
上面插在<head>~</head>中間color是顏色、下面是大小數字越大時間就越大
2008-08-02 17:35:43 補充:
<style type="text/css">
#show{
color:red;
font-size:30px;
}
</style>
2008-08-02 20:45:28 補充:
以上全形改半形
2008-08-02 22:45:14 補充:
改div圖層的內容用CSS改就好了.....