您好,欢迎来到模板无忧!
登录
注册
鏀惰棌
鎼滅储
鍦板浘
甯姪
模板无忧
网页特效
每日更新
|
TOP排行榜
|
Tag标签
|
充值
无忧首页
网页模板
程序模板
建站教程
视频教程
网页特效
图标素材
字体下载
站长工具
站长问答
关闭顶部
展开顶部
网页特效
菜单导航
图片特效
文本链接
层和布局
页面背景
表单按钮
日期时间
计算转换
键盘鼠标
浏览器
游戏娱乐
综合其它
常用代码
jQuery特效
Prototype
Ajax/JavaScript
ExtJS
CSS特效
在线编辑器
Mootools
HTML
JS广告代码合集
站长工具
站长常用软件
网站综合查询
Alexa排名查询
Google PR查询
域名Whois查询
网站收录查询
友情链接查询
CSS2中文手册
CSS精简优化工具
AI灏忚仛 鑳藉啓浼氱敾
鍩熷悕
鎺ㄨ崘
展开边栏
关闭边栏
网页特效代码
模板无忧
>
网页特效
>
日期时间特效代码
>
收藏
分享
查看评论
日期时间
演示
时间跳动器_日期时间特效
0/5
1
2
3
4
5
查看演示效果
特效Tag:
时间
添加
缁囨ⅵDedeCMS瑙嗛鏁欑▼
涔扮┖闂� 绉熸湇鍔″櫒 閫夌綉纭曚簰鑱旓紒
鏃犲咖绔欓暱宸ュ叿,鐧惧害鏉冮噸涓€閿叏鏌�!
时间跳动器,您可以先修改部分代码再运行.
脚本说明: 第一步:把如下代码加入<head>区域中 <script language="JavaScript"> <!-- Hide this script from old browsers -- function modRange (value, min, max) { if (min == max) { return (min) } var low = Math.min (min, max) var high = Math.max (min, max) var range = high - low + 1 var valOff = parseInt (value) - low var mod = range * Math.floor (valOff / range) result = low + valOff - mod if (result < low) { result += high } if (result > high) { result = low } return (result) } function array () { this[0] = null } function timerAppStart () { this.stop () this.loop () } function timerAppStop () { clearTimeout (this.timeout) this.timeout = null } function timerAppToggle () { if (this.timeout) { this.stop () } else { this.start () } } function timerAppLoop () { this.update () command = this.name + '.loop()' for (var i = 0; i < this.syncCount; i++) { if (this.syncName[i] != '') { if (--this.syncCountdown[i] <= 0) { this.syncCountdown[i] = this.syncInterval[i] command += ';' + this.syncName[i] + '.update()' } } } this.timeout = setTimeout (command, this.interval) } function timerAppSetOutput (output) { if (! this.output) { this.output = output } } function timerAppSetInterval (interval) { if (interval) { var newInterval = parseInt (interval) if (newInterval > 0) { this.interval = newInterval } else { alert ('Interval value must be a positive number: ' + interval) } } } function timerAppSync (name, interval) { if (interval == null) { interval = 1 } if (interval <= 0) { eval (this.name + '.unsync("' + name + '")') return } var newIndex = this.syncCount for (var i = 0; i < this.syncCount; i++) { if (this.syncName[i] == name) { newIndex = i break } } if (newIndex == this.syncCount) { this.syncCount++ } this.syncInterval[newIndex] = interval this.syncCountdown[newIndex] = interval this.syncName[newIndex] = name } function timerAppUnsync (name) { for (var i = 0; i < this.syncCount; i++) { if (this.syncName[i] == name) { this.syncName[i] = '' if (i == (this.syncCount - 1)) { this.syncCount-- } } } } function timerAppSetIncrement (increment) { if (increment) { var newIncrement = parseInt (increment) //*Unix only* if (! isNan (newIncrement)) { if (newIncrement != 0) { this.increment = newIncrement } else { alert ('Increment value must be a number: ' + increment) } } } function timerAppSetBounce (bounce) { if (bounce) { var newBounce = parseInt (bounce) //*Unix only* if (! isNan (newBounce)) { if (newBounce != 0) { this.bounce = newBounce } else { alert ('Bounce value must be a number: ' + bounce) } } } function timerAppSetOffset (offset) { if (offset) { var newOffset = parseInt (offset) if ((newOffset > 0) && (newOffset <= this.output.length)) { this.offset = newOffset } else { warnMessage = 'Value of offset must be a valid index (0 - ' + this.output.length + '): ' + offset alert (warnMessage) } } } function clock (name, output, interval) { // Initialize with default values this.name = name // object name, needed for setTimeout this.output = null // output area this.interval = 1000 // milliseconds this.timeout = null this.syncCount = 0 this.syncName = new array () this.syncInterval = new array () this.syncCountdown = new array () // Define object methods this.update = clockUpdate this.start = timerAppStart this.stop = timerAppStop this.toggle = timerAppToggle this.loop = timerAppLoop this.setOutput = timerAppSetOutput this.setInterval = timerAppSetInterval this.sync = timerAppSync this.unsync = timerAppUnsync // Initialize with specified values this.setOutput (output) this.setInterval (interval) this.start() } function clockUpdate () { var now = new Date() var timeHH = now.getHours(); var timeMM = now.getMinutes() var timeSS = now.getSeconds() var msec = now.getTime () var timeSSm = msec - 1000 * Math.floor (msec / 1000) timeSSm = '00' + timeSSm timeSSm = timeSSm.substring(timeSSm.length-3, timeSSm.length) var timeString = ((timeHH < 10) ? '0' : '') + timeHH + ':' + ((timeMM < 10) ? '0' : '') + timeMM + ':' + ((timeSS < 10) ? '0' : '') + timeSS + '.' + timeSSm if (this.output) { this.output.value = timeString } else { self.status = timeString } } function buttons (name, output, interval, increment, bounce, offset) { // Initialize with default values this.name = name this.output = null this.interval = 1000 this.increment = 1 this.bounce = 1 this.offset = 0 this.timeout = null this.syncCount = 0 this.syncName = new array () this.syncInterval = new array () this.syncCountdown = new array () // Define object methods this.update = buttonsUpdate this.start = timerAppStart this.stop = timerAppStop this.toggle = timerAppToggle this.loop = timerAppLoop this.setOutput = timerAppSetOutput this.setInterval = timerAppSetInterval this.sync = timerAppSync this.unsync = timerAppUnsync this.setIncrement = timerAppSetIncrement this.setBounce = timerAppSetBounce this.setOffset = timerAppSetOffset // Initialize with specified values this.setOutput (output) this.setInterval (interval) this.setIncrement (increment) this.setBounce (bounce) this.setOffset (offset) this.start() } function buttonsUpdate () { if (this.output) { var newOffset = this.offset + this.increment if ((newOffset < this.output.length) && (newOffset >= 0)) { this.offset = newOffset } else { this.increment *= this.bounce if (this.increment >= 0) { this.increment = modRange (this.increment, 0, this.output.length-1) } else { this.increment = 0 - modRange (Math.abs (this.increment), 0, this.output.length-1) } this.offset += this.increment this.offset = modRange (this.offset, 0, this.output.length-1) } this.output[this.offset].checked = true } } // -- End Hiding Here --> </script> 第二步:把如下代码加入<body>区域中 <FORM NAME='clock' ACTION=''> <TABLE BORDER=2><TR><TD> <FONT SIZE=-2> <INPUT TYPE='text' NAME='display' SIZE=8 onFocus='wClock.toggle()' onMouseOver='self.status="Click here to turn on/off clock"; return true'> </FONT> </TD></TR></TABLE> </FORM> <FORM NAME='imastudios'> <P> <INPUT TYPE='radio' NAME='buttons'> Tick <INPUT TYPE='radio' NAME='buttons'> Tock <INPUT TYPE='radio' NAME='buttons'> Tick <INPUT TYPE='radio' NAME='buttons'> Tock <INPUT TYPE='radio' NAME='buttons'> Tick </FORM> 第三步:把<body>区中内容改为 <body bgcolor="#fef4d9" onLoad='wClock = new clock ("wClock", document.clock.display); wButtons = new buttons ("wButtons", document.imastudios.buttons, 500, 1,-1); wButtons.stop(); wClock.sync ("wButtons", 1)'onUnload='wClock.stop(); wButtons.stop()' bgcolor="#FFFFFF">
所属频道:
日期时间特效
/
更新时间:2012-05-08
[收藏]
[报错]
[返回列表]
评论加载中....
相关
日期时间特效
:
一款漂亮的日历脚本
柱状时钟
计算圆周率
随机数据显示功能、选号器
层时钟
跟随时钟
在线日历
一个倒记时
显示登陆时间
知道两点的坐标计算机出他们之间的距离
跟随鼠标的时钟
日期时间信息 Script
日期时间特效Rss订阅
特效代码搜索
日期时间特效推荐
日历一
世界人口计算器!有一定的科学性
JavaScript根据时间自动标示最新内容
JavaScript计算两个时间差
猜你的属相
倒计时
在网页上显示时间
Js日期选择并自动加入输入框
在状态栏显示时间
查找是星期几
猜你也喜欢看这些
JS+VML生成圆形百分比饼图
HTML转换为JS代码
JavaScript对Email地址加密
计算文本框允许输入字符的百分比
人民币大小写转换(JavaScript)
好酷的球体下坠碰撞弹跳特效
JavaScript长度单位互相转换
JavaScript数字排序
Table+JavaScript表格排序
32位JavaScript版MD5加密函数
相关链接:
复制本页链接
|
搜索时间跳动器
特效说明:
日期时间模板
-
时间跳动器
。
鏀惰棌&鍒嗕韩
QQ绌洪棿
鏂版氮寰崥
鑵捐寰崥
浜轰汉缃�
寮€蹇冪綉
鐧惧害鎼滆棌
澶嶅埗缃戝潃
鏇村...