网站公告列表

  没有公告

加入收藏
设为首页
联系站长
繁體中文
您现在的位置: 无忧电脑 >> 文章中心 >> 网页设计 >> 网页设计 >> 文章正文
  随鼠标移动的时钟代码           ★★★ 【字体:
随鼠标移动的时钟代码
作者:佚名    文章来源:互联网    点击数:    更新时间:2008-7-15    

                                                                                        
 

<HTML>
<HEAD>
<TITLE>浮动的时钟</TITLE>
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>

<script language=javascript>
dCol='000000';//date colour.
fCol='000000';//face colour.
sCol='000000';//seconds colour.
mCol='000000';//minutes colour.
hCol='000000';//hours colour.
ClockHeight=30;
ClockWidth=30;
ClockFromMouseY=0;
ClockFromMouseX=50;
d=new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
m=new Array("元月份","二月份","三月份","四月份","五月份","六月份","七月份","八月份","九月份","十月份","十一月","十二月");
date=new Date();
day=date.getDate();
year=date.getYear();
if (year < 2000) year=year+1900;
TodaysDate=" "+d[date.getDay()]+" "+day+" "+m[date.getMonth()]+" "+year;
D=TodaysDate.split('');
H='...';
H=H.split('');
M='....';
M=M.split('');
S='.....';
S=S.split('');
Face='1 2 3 4 5 6 7 8 9 10 11 12';
font='Arial';
size=1;
speed=0.6;
ns=(document.layers);
ie=(document.all);
Face=Face.split(' ');
n=Face.length;
a=size*10;
ymouse=0;
xmouse=0;
scrll=0;
props="<font face="+font+" size="+size+" color="+fCol+"><B>";
props2="<font face="+font+" size="+size+" color="+dCol+"><B>";
Split=360/n;
Dsplit=360/D.length;
HandHeight=ClockHeight/4.5
HandWidth=ClockWidth/4.5
HandY=-7;
HandX=-2.5;
scrll=0;
step=0.06;
currStep=0;
y=new Array();x=new Array();Y=new Array();X=new Array();
for (i=0; i < n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0}
Dy=new Array();Dx=new Array();DY=new Array();DX=new Array();
for (i=0; i < D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0}
if (ns){
for (i=0; i < D.length; i++)
document.write('<layer name="nsDate'+i+'" top=0 left=0 height='+a+' width='+a+'><center>'+props2+D[i]+'</font></center></layer>');
for (i=0; i < n; i++)
document.write('<layer name="nsFace'+i+'"

[1] [2] [3] [4] 下一页

 
                                                                      
 

文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    没有相关文章
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

                         无忧电脑 QQ群:19938280   闽ICP备08000694号       
                      本站有些内容参考互联网,如有侵犯到你的地方,请来信通知,我们将会在三日内处理