本页内容是《石英钟》同时我们还提供济宁地区的网站建设,百度,雅虎,google的推广,点金,商友,等营销软件
请输入关键字:

标题搜索 内容搜索  

你现在所在的位置->首页->javascript->石英钟

石英钟

时间:[2005-7-28 12:09:33]     作者:http://www.21tx.com/dev/2004/06/02/10072.html

pX=200;pY=100
obs  =  new  Array(13)
function  ob  ()  {
for  (i=0;  i<13;  i++)  {
if  (document.all)  obs[i]=new  Array  (eval(''ob''+i).style,-100,-100)
else  obs[i]  =  new  Array  (eval(''document.ob''+i),-100,-100)
}
}
function  cl(a,b,c){
if  (document.all)  {
if  (a!=0)  b+=-1
eval(''c''+a+''.style.pixelTop=''+(pY+(c)))
eval(''c''+a+''.style.pixelLeft=''+(pX+(b)))
}
else{
if  (a!=0)  b+=10
eval(''document.c''+a+''.top=''+(pY+(c)))
eval(''document.c''+a+''.left=''+(pX+(b)))
}
if  (document.all)  c0.style.pixelLeft=26
}

function  runClock()  {
for  (i=0;  i<13;  i++)  {
obs[i][0].left=obs[i][1]+pX
obs[i][0].top=obs[i][2]+pY
}
}

var  lastsec
function  timer()  {
time  =  new  Date  ()
sec  =  time.getSeconds()
if  (sec!=lastsec)  {

lastsec  =  sec
sec=Math.PI*sec/30
min=Math.PI*time.getMinutes()/30
hr  =Math.PI*((time.getHours()*60)+time.getMinutes())/360
for  (i=1;i<6;i++)  {
obs[i][1]  =  Math.sin(sec)  *  (44  -  (i-1)*11)-16;
if  (document.layers)obs[i][1]+=10;
obs[i][2]  =  -Math.cos(sec)  *  (44  -  (i-1)*11)-27;
}
for  (i=6;i<10;i++)  {
obs[i][1]  =  Math.sin(min)  *  (40  -  (i-6)*10)-16;
if  (document.layers)obs[i][1]+=10;
obs[i][2]  =  -Math.cos(min)  *  (40  -  (i-6)*10)-27;
}
for  (i=10;i<13;i++)  {
obs[i][1]  =  Math.sin(hr)  *  (37  -  (i-10)*11)-16;
if  (document.layers)obs[i][1]+=10;
obs[i][2]  =  -Math.cos(hr)  *  (37  -  (i-10)*11)-27;
}
}

}
function  setNum(){

cl  (0,-67,-65);
cl  (1,10,-51);
cl  (2,28,-33);
cl  (3,35,-8);
cl  (4,28,17);
cl  (5,10,35);
cl  (6,-15,42);
cl  (7,-40,35);
cl  (8,-58,17);
cl  (9,-65,-8);
cl  (10,-58,-33);
cl  (11,-40,-51);
cl  (12,-16,-56);
}
//-->
                                                                                                                                                                                                                                                                                                
                                                                                                                

【声明】本站刊载的《石英钟》一文如果有侵害你权益的情况,请联系我们。我们将及时采取措施。
QQ:44637339 Email:just6@163.com Tel:13355163107 Lining studios

友情链接

本页内容是《石英钟》 返回顶部
© 2001-2024 Lining studios 济宁速创科技有限公司, All Rights Reserved
 Processed Time:62.500ms
中华人民共和国信息产业部网站备案号: 鲁ICP备09103015号-1