窄欄隨機換圖時計

2008032902:51

 

窄欄隨機換圖時計(二度空間)語法編輯

此語法不適合用在奇摩部落格,只能用在有支援HTML與JavaScript語法的部落格或個人網頁

  <!--語法開始-->
<!--複製語法時,請用文字文件記事本轉貼成純文字,勿用自動換行,以免語法執行錯誤,再貼上欄位中-->
<!--欲修改欄位語法,建議在記事本編輯後重貼,以免先前貼的語法失效,不能使用-->
<!--表格裝置內容置中-->
<div align="center">
<center>
<!--設框線寬高為%,可自動與窄欄同寬高-->
<table cellspacing="5" /*←框線與框線的空白距離*/ style="border:10px ridge #ffccff; /*←外框線的粗細與顏色*/" width="100%" height="100%" bgcolor="#cccccc" /*←外層表格背景色*/>
<tr>
<td width="100%" height="100%">
<div align="center">
<center>
<table width="100%" height="100%" style="border:2px ridge #660066; /*←內框線的粗細與顏色*/" background=內層表格背景圖片網址.gif bgcolor="#CCCCCC" /*←內層表格背景色*/>
<tr>
<td align="center">
<!--隨機換圖語法(圖片數量依序自行增加)-->
<!--圖片網址自行加入,圖片顯示的寬高建議設定一致-->
<script language="JavaScript">
<!--
tips = new Array()
tips[0] = "<img src=圖片網址.gif height=225 width=90>"
tips[1] = "<img src=圖片網址.gif height=225 width=90>"
tips[2] = "<img src=圖片網址.gif height=225 width=90>"
tips[3] = "<img src=圖片網址.gif height=225 width=90>"
tips[4] = "<img src=圖片網址.gif height=225 width=90>"
index = Math.floor(Math.random() * tips.length)
document.write("" + tips[index] + "")
-->
</script>
<!--時間日期語法(字體顏色與大小,依照顯示位置自行調整)-->
<SCRIPT LANGUAGE="javascript">
function Year_Month(){
var now = new Date();
var yy = now.getYear();
var mm = now.getMonth()+1;
var cl = '<b><font color="#000000">';
return(cl +yy + '年' + mm + '月</font></b>');
}function Date_of_Today(){
var now = new Date();
var cl = '<b><font color="#000000">';
if (now.getDay() == 0) cl = '<b><font color="#FF0000">';
if (now.getDay() == 6) cl = '<b><font color="#008000">';
return(cl +now.getDate() + '</font></b>');
}function Day_of_Today(){
var day = new Array();
day[0] = "星期日";
day[1] = "星期一";
day[2] = "星期二";
day[3] = "星期三";
day[4] = "星期四";
day[5] = "星期五";
day[6] = "星期六";
var now = new Date();
var cl = '<b><font color="#000000">';
if (now.getDay() == 0) cl = '<b><font color="#FF0000">';
if (now.getDay() == 6) cl = '<b><font color="#008000">';
return(cl +day[now.getDay()] + '</font></b>');
}function CurentTime(){
var now = new Date();
var hh = now.getHours();
var mm = now.getMinutes();
var ss = now.getTime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock);
}function refreshCalendarClock(){
document.all.calendarClock1.innerHTML = Year_Month();
document.all.calendarClock2.innerHTML = Date_of_Today();
document.all.calendarClock3.innerHTML = Day_of_Today();
document.all.calendarClock4.innerHTML = CurentTime();
}
document.write('<p align="center"><b><font id="calendarClock1" style="font-family:宋體;font-size:9pt;line-height:120%"> </font></b><br>');
document.write('<b><font id="calendarClock2" style="font-family:Arial;font-size:18pt;line-height:120%"> </font></b><br>');
document.write('<b><font id="calendarClock3" style="font-family:宋體;font-size:9pt;line-height:120%"> </font></b><br>');
document.write('<b><font id="calendarClock4" style="color:#000000;font-family:新細明體;font-size:9pt;line-height:120%"></font></b>');
refreshCalendarClock()
setInterval('refreshCalendarClock()',1000);
</SCRIPT>
<!--如果不想使用此語法,可以拿掉<A--與/A> -->
<A style="text-decoration:none" href="javascript:window.location.reload()" title=點我重新整理><font face="Webdings" color="#FF0000" size="4pt">q</font></A>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
<!--語法結束-->