2019新能源汽车产业排行
全世界各行各业联合起来,internet一定要实现!
老文章正文

网页特效大放送之特酷时钟

2004-03-11 eNet&Ciweek

第一步:把如下代码加入<head>区域中:
<script language="javascript1.1">

<!--

/*

Live clock script credit: Website Abstraction (www.wsabstract.com).

Your free JavaScripts archieve, with over 200+ free JavaScripts.

This script may be freely used as long as credit remains intact.

*/

var dn

c1=new Image(); "

c2=new Image(); "

c3=new Image(); "

c4=new Image(); "

c5=new Image(); "

c6=new Image(); "

c7=new Image(); "

c8=new Image(); "

c9=new Image(); "

c0=new Image(); "

cb=new Image(); "

cam=new Image(); "

cpm=new Image(); "

function extract(h,m,s,type){

if (!document.images)

return

if (h<=9){

document.images.a.src=cb.src

document.images.b.src=eval("c"+h+".src")

}

else {

document.images.a.src=eval("c"+Math.floor(h/10)+".src")

document.images.b.src=eval("c"+(h%10)+".src")

}

if (m<=9){

document.images.d.src=c0.src

document.images.e.src=eval("c"+m+".src")

}

else {

document.images.d.src=eval("c"+Math.floor(m/10)+".src")

document.images.e.src=eval("c"+(m%10)+".src")

}

if (s<=9){

document.g.src=c0.src

document.images.h.src=eval("c"+s+".src")

}

else {

document.images.g.src=eval("c"+Math.floor(s/10)+".src")

document.images.h.src=eval("c"+(s%10)+".src")

}

if (dn=="AM") document.j.src=cam.src

else document.images.j.src=cpm.src

}

function show3(){

if (!document.images)

return

var Digital=new Date()

var hours=Digital.getHours()

var minutes=Digital.getMinutes()

var seconds=Digital.getSeconds()

dn="AM"

if ((hours>=12)&&(minutes>=1)  (hours>=13)){

dn="PM"

hours=hours-12

}

if (hours==0)

hours=12

extract(hours,minutes,seconds,dn)

setTimeout("show3()",1000)

}

//-->

</script>


第二步:把<body>中加入如下代码:
<img " name="a"><img " name="b"><img " name="c"><img " name="d"><img " name="e"><img " name="f"><img " name="g"><img " name="h"><img " name="j">


第三步:把<body>中内容改为:
<body bgcolor="#fef4d9" onLoad="show3()">

相关频道: eNews 老文章

您对本文或本站有任何意见,请在下方提交,谢谢!

投稿信箱:tougao@enet16.com
广告