导航
电话
咨询
地图
顶部
中文日期限制 [Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]英文日期显示:dCol='000099';//date colour. fCol='668099';//face colour. sCol='FF0000';//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'; font='Verdana'; 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=""; props2=""; 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(''+props2+D[i]+''); for (i=0; i < n; i++) document.write(''+props+Face[i]+''); for (i=0; i < S.length; i++) document.write(''+S[i]+''); for (i=0; i < M.length; i++) document.write(''+M[i]+''); for (i=0; i < H.length; i++) document.write(''+H[i]+''); } if (ie){ document.write(''); for (i=0; i < D.length; i++) document.write(''+props2+D[i]+''); document.write(''); document.write(''); for (i=0; i < n; i++) document.write(''+props+Face[i]+''); document.write(''); document.write(''); for (i=0; i < H.length; i++) document.write(''+H[i]+''); document.write(''); document.write(''); for (i=0; i < M.length; i++) document.write(''+M[i]+''); document.write('') document.write(''); for (i=0; i < S.length; i++) document.write(''+S[i]+''); document.write('') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Od.style.top=window.document.body.scrollTop; Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i < n; i++){ var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style; F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll; F.left=x[i] + ClockWidth*Math.cos(-1.0471 + i*Split*Math.PI/180); } for (i=0; i < H.length; i++){ var HL=(ns)?document.layers['nsHours'+i]:ieHours[i].style; HL.top=y[i]+HandY+(i*HandHeight)*Math.sin(hrs)+scrll; HL.left=x[i]+HandX+(i*HandWidth)*Math.cos(hrs); } for (i=0; i < M.length; i++){ var ML=(ns)?document.layers['nsMinutes'+i]:ieMinutes[i].style; ML.top=y[i]+HandY+(i*HandHeight)*Math.sin(min)+scrll; ML.left=x[i]+HandX+(i*HandWidth)*Math.cos(min); } for (i=0; i < S.length; i++){ var SL=(ns)?document.layers['nsSeconds'+i]:ieSeconds[i].style; SL.top=y[i]+HandY+(i*HandHeight)*Math.sin(sec)+scrll; SL.left=x[i]+HandX+(i*HandWidth)*Math.cos(sec); } for (i=0; i < D.length; i++){ var DL=(ns)?document.layers['nsDate'+i]:ieDate[i].style; DL.top=Dy[i] + ClockHeight*1.5*Math.sin(currStep+i*Dsplit*Math.PI/180)+scrll; DL.left=Dx[i] + ClockWidth*1.5*Math.cos(currStep+i*Dsplit*Math.PI/180); } currStep-=step; } function Delay(){ scrll=(ns)?window.pageYOffset:0; Dy[0]=Math.round(DY[0]+=((ymouse)-DY[0])*speed); Dx[0]=Math.round(DX[0]+=((xmouse)-DX[0])*speed); for (i=1; i < D.length; i++){ Dy[i]=Math.round(DY[i]+=(Dy[i-1]-DY[i])*speed); Dx[i]=Math.round(DX[i]+=(Dx[i-1]-DX[i])*speed); } y[0]=Math.round(Y[0]+=((ymouse)-Y[0])*speed); x[0]=Math.round(X[0]+=((xmouse)-X[0])*speed); for (i=1; i < n; i++){ y[i]=Math.round(Y[i]+=(y[i-1]-Y[i])*speed); x[i]=Math.round(X[i]+=(x[i-1]-X[i])*speed); } ClockAndAssign(); setTimeout('Delay()',10); } if (ns||ie)window.onload=Delay; [Ctrl+A 全选 注:引入外部Js需再刷新一下页面才能执行]
# 可在 # 两种 # 英文 # 鼠标 # 值为 # 背景色 # 你要 # 全选 # 星期日 # 要你 # color # 宋体 # 某年某月 # 器里 # face # NS # 最慢 # 能看到 # 大段 # 速度最快 # 鼠标移动 # 时钟 # JavaScript实现简单的时钟实例代码 # 基于javascript实现动态时钟效果 # JS实现的网页倒计时数字时钟效果 # js实现一个简单的数字时钟效果 # js实现倒计时时钟的示例代码 # js时钟翻牌效果实现代码分享 # JS实现简易刻度时钟示例代码 # javascript结合Canvas 实现简易的圆形时钟 # javascript背景时钟实现方法 # JS实现简易换图时钟功能分析
相关栏目: 【 行业资讯 】 【 网络运营 】 【 GEO优化 】 【 营销推广 】 【 SEO优化 】 【 技术教程 】 【 代码知识 】 【 AI推广 】
相关推荐: 关于Flex 初始化的research 通过HSODBC访问mysql的实现步骤 asp.net checkbox 动态绑定id GridView删除提示 Oracle 中文字段进行排序的sql语句 CSS 美化表格边框为凹陷立体效果的实现方法 伪静态技术介绍与优缺点分析(较完整篇) Domino中运用jQuery读取视图内容的方法 javascript 面向对象编程 万物皆对象 数据库中union 与union all 的区别 mysql 日期和时间函数 php 向访客和爬虫显示不同的内容 添加FCKeditor插件需要注意的地方 DBCC CHECKIDENT 重置数据库标识列从某一数值开始 windows 复制隐藏帐号完全批处理 js 操作符实例代码 js与ASP.NET 中文乱码问题 asp.net dataview做无限极分类的又一用法 Oracle 存储过程加密方法 PHP5 操作MySQL数据库基础代码 PHP 文件上传源码分析(RFC1867) APACHE 配置文件中文版 httpd.conf FOR Apache 2.2.13 实现按关健字模糊查询,并按匹配度排序的SQL语句 Python+Django在windows下的开发环境配置图解 从Web查询数据库之PHP与MySQL篇 asp 取一个数的整数 但不是四舍五入,只要有小数,就取大于这个数的整数 access数据库用sql语句添加字段,修改字段,删除字段 PHP 处理图片的类实现代码 Excel导入Sqlserver数据库脚本 实用的JS表单验证提示效果 javascript createElement()创建input不能设置name属性的解决方法 三网主机加速引擎 三代功能助网站腾飞 支持ie与FireFox的剪切板操作代码 javascript 随机抽奖程序代码 用document.documentElement取代document.body的原因分析 国外开发者谈为何放弃PHP而改用Python php 服务器调试 Zend Debugger 的安装教程 javascript线性渐变一 在oracle 数据库中查看一个sql语句的执行时间和SP2-0027错误 IE Firefox 使用自定义标签的区别 Mootools 1.2 手风琴(Accordion)教程 extjs 学习笔记 四 带分页的grid 按键盘方向键翻页跳转的javascript代码(支持ie,firefox) php 远程包含文件漏洞分析第1/6页 xhEditor的异步载入实现代码 mysql 日期和时间格式转换实现语句 php面向对象全攻略 (十) final static const关键字的使用 网页游戏开发入门教程三(简单程序应用) JS window.opener返回父页面的应用 php面向对象全攻略 (七) 继承性 jQuery 使用手册(六)
赣ICP备2024031479号