地市分站
用户名
密  码
您现在的位置是:树人网首页 / 计算机等级考试 / 资格水平考试 / 文章浏览
网页特效:跟随鼠标飘动的双层时钟
文章来源:来源网络 发表时间:2008-06-07 点击次数
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  <HTML><HEAD>
  <META http-equiv=Content-Type content="text/html; charset=windows-1252">
  <META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
  <BODY>
  <script language=Javascript>
  dCol='000000';//date colour.
  fCol='000000';//face colour.
  sCol='000000';//seconds colour.
  mCol='000000';//minutes colour.
  hCol='000000';//hours colour.
  ClockHeight=40;
  ClockWidth=40;
  ClockFromMouseY=0;
  ClockFromMouseX=100;
  //Alter nothing below! Alignments will be lost!
  d=new Array("SUNDAY","MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY");
  m=new Array("JANUARY","FEBRUARY","MARCH","APRIL","MAY","JUNE","JULY","AUGUST","SEPTEMBER","OCTOBER","NOVEMBER","DECEMBER");
  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+'" top=0 left=0 height='+a+' width='+a+'><center>'+props+Face[i]+'</font></center></layer>');
   for (i=0; i < S.length; i++)
   document.write('<layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+sCol+'><center><b>'+S[i]+'</b></center></font></layer>');
   for (i=0; i < M.length; i++)
   document.write('<layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+mCol+'><center><b>'+M[i]+'</b></center></font></layer>');
   for (i=0; i < H.length; i++)
   document.write('<layer name=nsHours'+i+' top=0 left=0 width=15 height=15><font face=Arial size=3 color='+hCol+'><center><b>'+H[i]+'</b></center></font></layer>');


第 页

责任编辑:qwer19871212

相关文章
公告栏

“蓝焰杯”第二届河南教育十大新闻人物火热评选中!!

点击参加评选,为你心目中的新闻人物投上一票>>>>
频道内容精选
[计算机考试]程序员必考的知识点
论坛/博客精选