001說明 數字化的時鐘
效果 現在時刻:0:12:31
<span id="liveclock" style"=width: 109px; height: 15px"></span>
<SCRIPT language=Javascript>
function www_helpor_net()
{
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
if(minutes<=9)
minutes="0"+minutes
if(seconds<=9)
seconds="0"+seconds
myclock="現在時刻:<font size='5' face='Arial black'>"+hours+":"+minutes+":"+seconds+"</font>"
if(document.layers){document.layers.liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}else if(document.all)
liveclock.innerHtml=myclock
setTimeout("www_helpor_net()",1000)
}
www_helpor_net();
//-->
</SCRIPT>
002說明 六種風格時間顯示,一定有你喜歡的!
效果 風格一: 星期三,4月21日,2004年
風格二: 0:12:45上午
風格三: 星期三,4月21日,2004年 0:12:45上午
風格四: 4/21/04
風格五: 0:12:45
風格六: Wed Apr 21 00:12:45 UTC+0800 2004
<SCRIPT language="Javascript">
<!--
function initArray()
{
for(i=0;i<initArray.arguments.length;i++)
this[i]=initArray.arguments[i];
}
var isnMonths=new initArray("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月");
var isnDays=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六","星期日");
today=new Date();
hrs=today.getHours();
min=today.getMinutes();
sec=today.getSeconds();
clckh=""+((hrs>12)?hrs-12:hrs);
clckm=((min<10)?"0":"")+min;clcks=((sec<10)?"0":"")+sec;
clck=(hrs>=12)?"下午":"上午";
var stnr="";
var ns="0123456789";
var a="";
function getFullYear
{
yr=d.getYear();if(yr<1000)
yr+=1900;return yr;}
document.write("<table>");
//下面各行分別是一種風格,把不需要的刪掉即可
document.write("<TR><TD>風格一:</TD><TD>"+isnDays[today.getDay()]+","+isnMonths[today.getMonth()]+""+today.getDate()+"日,"+getFullYear(today)+"年");
document.write("<TR><TD>風格二:</TD><TD>"+clckh+":"+clckm+":"+clcks+""+clck+"</TD></TR>");
document.write("<TR><TD>風格三:</TD><TD>"+isnDays[today.getDay()]+","+isnMonths[today.getMonth()]+""+today.getDate()+"日,"+getFullYear(today)+"年 "+clckh+":"+clckm+":"+clcks+""+clck+"</TD></TR>");
document.write("<TR><TD>風格四:</TD><TD>"+(today.getMonth()+1)+"/"+today.getDate()+"/"+(getFullYear(today)+"").substring(2,4)+"</TD></TR>");
document.write("<TR><TD>風格五:</TD><TD>"+hrs+":"+clckm+":"+clcks+"</TD></TR>");
document.write("<TR><TD VALIGN=TOP>風格六:</TD><TD>"+today+"</TD></TR>");
document.write("</table>");
//-->
</SCRIPT>
003說明 顯示他人在頁面停留的時間,而且可以作出提醒
效果 您在本站逗留了
您在本站逗留了<input type="text" name="helpor_net" size="15" >
<SCRIPT language="Javascript">
<!--
var sec=0;
var min=0;
var hou=0;
flag=0;
idt=window.setTimeout("www_helpor_net();",1000);
function www_helpor_net()
{
sec++;
if(sec==60){sec=0;min+=1;}
if(min==60){min=0;hou+=1;}
if((min>0)&&(flag==0))
{
window.alert("您剛剛來了1分鐘!可別急著走開,還有好多好東東等著您呢!--站長");
flag=1;
}
helpor_net.value=hou+"小時"+min+"分"+sec+"秒";
idt=window.setTimeout("www_helpor_net();",1000);
}
//-->
</SCRIPT>
004說明 這個時鐘是有影子的,
而且還在不停地走著呢
效果 00:14:3300:14:33
<div id="bgclockshade" ></div>
<div id="bgclocknoshade" ></div>
<div id="mainbody" >
</div>
<script language=JavaScript>
<!--
function www_helpor_net() {
thistime= new Date()
var hours=thistime.getHours()
var minutes=thistime.getMinutes()
var seconds=thistime.getSeconds()
if (eval(hours) <10) {hours="0"+hours}
if (eval(minutes) < 10) {minutes="0"+minutes}
if (seconds < 10) {seconds="0"+seconds}
thistime = hours+":"+minutes+":"+seconds
if(document.all) {
bgclocknoshade.innerHtml=thistime
bgclockshade.innerHtml=thistime
}
if(document.layers) {
document.bgclockshade.document.write('<div id="bgclockshade" >'+thistime+'</div>')
document.bgclocknoshade.document.write('<div id="bgclocknoshade" >'+thistime+'</div>')
document.close()
}
var timer=setTimeout("www_helpor_net()",200)
}
www_helpor_net();
//-->
</script>
005說明 年月日都是用全中文顯示
效果 公元二零零三年四月二十一日
<script language="JavaScript">
<!--
function number(index1){
var numberstring="一二三四五六七八九十";
if(index1 ==0) {document.write("十")}
if(index1 < 10){
document.write(numberstring.substring(0+(index1-1),index1))}
else if(index1 < 20 ){
document.write("十"+numberstring.substring(0+(index1-11),(index1-10)))}
else if(index1 < 30 ){
document.write("二十"+numberstring.substring(0+(index1-21),(index1-20)))}
else{
document.write("三十"+numberstring.substring(0+(index1-31),(index1-30)))}
}
var today1 = new Date()
var month = today1.getMonth()+1
var date = today1.getDate()
var day = today1.getDay()
document.write("公元二零零三年")
number(month)
document.write("月")
number(date)
document.write("日")
//-->
</script>
006美女時鐘
</SPAN><SPAN id=_ctl0__ctl10_lblContent ><EMBED src=http://www.twinsbbs.com/swf/clock.swf type=application/x-shockwave-Flash></EMBED></SPAN></TD> </TR></TABLE>
<SCRIPT language=Javascript>
<!--
var s=document.all("_ctl0__ctl10_lblContent").innerText;
if(s=="當前您正處於安全模式,無法顯示文章內容!")document.all("_ctl0__ctl10_lblContent").outerHtml="<span style='color:red;font-size:12px;border:1px black solid;background-color:#cccccc'>"+s+"</span>";
//-->
</SCRIPT>
<BR>
<TABLE width="100%">
<TBODY>
<TR>
<TD></TD></TR>
<TR>
<TD></TD></TR></TBODY></TABLE>