您好,欢迎访问宜昌市隼壹珍商贸有限公司
中文日期限制 [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需再刷新一下页面才能执行]
# 鼠标移动 # 时钟 # JavaScript实现简单的时钟实例代码 # 基于javascript实现动态时钟效果 # JS实现的网页倒计时数字时钟效果 # js实现一个简单的数字时钟效果 # js实现倒计时时钟的示例代码 # js时钟翻牌效果实现代码分享 # JS实现简易刻度时钟示例代码 # javascript结合Canvas 实现简易的圆形时钟 # javascript背景时钟实现方法 # JS实现简易换图时钟功能分析 # 鼠标 # 全选 # 你要 # 两种 # 可在 # 英文 # 要你 # 值为 # 宋体 # 速度最快 # 背景色 # 大段 # 星期日 # 最慢 # 某年某月 # 器里 # 能看到 # color # NS # face
相关栏目: 【 行业新闻 】 【 网络资讯 】 【 网络推广 】 【 技术学院 】 【 营销学院 】 【 云计算 】 【 AI营销 】 【 百度推广 】
相关推荐: Linux如何安装Tomcat应用服务器_Linux环境部署与端口修改【教程】 Laravel如何处理和验证JSON类型的数据库字段 Mac怎么进行语音输入_Mac听写功能设置与使用【教程】 Laravel怎么创建自己的包(Package)_Laravel扩展包开发入门到发布 Win11怎么关闭右下角弹窗_Win11拦截系统通知广告【设置】 MAC怎么设置程序窗口永远最前_MAC窗口置顶插件安装与快捷设置【方法】 laravel怎么在测试中断言(assert)一个事件被分发_laravel测试中事件断言方法 c# 在高并发下使用反射发射(Reflection.Emit)的性能 Laravel中的软删除(Soft Deletes)如何使用和恢复数据 ASP 三层架构 Convert类实现代码 Win11怎么清理C盘虚拟内存_Win11清理虚拟内存设置【教程】 MSSQL 多字段根据范围求最大值实现方法 Win11用户账户控制怎么关_Win11关闭UAC弹窗提示【设置】 C# 多线程读取注册表,加载至TreeView 通过JS 获取Mouse Position(鼠标坐标)的代码 Win11怎么解压RAR文件 Win11自带解压功能使用方法 javascript 必知必会之closure Win11怎么开启上帝模式_创建Windows 11 God Mode全能文件夹【技巧】 Laravel如何使用访问器(Accessors)和修改器(Mutators) Mootools 1.2教程 类(一) Win10系统怎么查看网络连接状态_Windows10网络和共享中心 Win11如何卸载OneDrive_Win11卸载OneDrive方法【教程】 找到MySQL的优点 Laravel怎么在Controller中获取当前登录的用户信息 Win11怎样彻底卸载自带应用_Win11彻底卸载自带应用方法【步骤】 Win11怎么格式化U盘_Win11系统U盘格式化与文件系统选择【教程】 Ajax 核心框架函数及例子 Win11怎么退出微软账户_切换Win11为本地账户登录方法【详解】 Laravel如何处理CORS跨域问题_Laravel项目CORS配置与解决方案 Laravel怎么自定义错误页面和异常处理 Win10任务栏天气和资讯怎么关闭 Win10禁用新闻和兴趣功能【教程】 Win11怎么关闭SmartScreen_禁用Windows Defender筛选器教程【步骤】 Win11触摸板没反应怎么办_开启Win11笔记本触摸板手势教程【步骤】 alt键 chr码值对应列表查看方法 jQuery 使用手册(四) php 代码优化的42条建议 推荐 Laravel模型访问器和修改器_Laravel Accessor和Mutator用法 Win10如何备份驱动程序_Win10驱动备份步骤【攻略】 Laravel怎么配置和使用Redis进行缓存 Win11怎样安装微信开发者工具_Win11安装开发者工具教程【步骤】 Laravel中的任务调度(Task Scheduling)如何设置定时任务 Laravel Cookie怎么设置_Laravel Cookie读取与删除方法 解決安裝了apache却找不到服务的问题 Laravel如何实现API资源集合?(Resource Collection教程) Laravel怎么进行数据库事务处理_Laravel DB Facade事务操作确保数据一致性 Laravel如何为API生成Swagger或OpenAPI文档 Python lxml的etree和ElementTree有什么区别 Win11怎么设置ipv4地址_Windows 11固定静态IP地址配置教程【详解】 Laravel Session怎么存储_Laravel Session驱动配置详解 laravel多对多关系怎么附加额外字段_laravel多对多关系额外字段处理方法
全国统一服务电话
电子邮箱:879577@qq.com
公司地址:宜昌市西陵区黄河路5号三峡明珠10栋1051室
咨询微信
TEL:13680874598