爱易网
IT新闻
IT新闻
爱易资讯
网站搭建
云虚拟主机教程
云服务器教程
Apache教程
IIS教程
Nginx教程
网站策划
站长文章
推广教程
淘宝客教程
网页设计
HTML教程
XHTML教程
CSS教程
HTML5教程
CSS3教程
JavaSript基础
JQuery教程
Node.js教程
前端技术
Ajax教程
Js特效
Xml教程
平面设计
页面UI设计
photoshop教程
程序开发
AI人工智能
Asp教程
Php教程
Asp.Net教程
Net Core教程
C#教程
Java教程
Jsp教程
开发技术
微信小程序教程
Uniapp开发教程
微信公众号开发
Andriod教程
IOS教程
DOS教程
Python教程
Docker教程
Windows Container教程
数据库
MSSQL教程
MySQL教程
Redis教程
Access教程
Oracle教程
数据库教程
操作系统
Linux教程
Windows教程
MAC教程
Cisco教程
交换机教程
防火墙教程
搜索
爱易网页
JS特效
时间精确计算程序
时间精确计算程序
日期:2014-05-18 浏览次数:20183 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中 <script language="Javascript"> <!-- Gracefully hide from old browsers function timestamp_class(this_current_time, this_start_time, this_end_time, this_time_difference) { this.this_current_time = this_current_time; this.this_start_time = this_start_time; this.this_end_time = this_end_time; this.this_time_difference = this_time_difference; this.GetCurrentTime = GetCurrentTime; this.StartTiming = StartTiming; this.EndTiming = EndTiming; } //Get current time from date timestamp function GetCurrentTime() { var my_current_timestamp; my_current_timestamp = new Date(); //stamp current date & time return my_current_timestamp.getTime(); } //Stamp current time as start time and reset display textbox function StartTiming() { this.this_start_time = GetCurrentTime(); //stamp current time document.TimeDisplayForm.TimeDisplayBox.value = 0; //init textbox display to zero } //Stamp current time as stop time, compute elapsed time difference and display in textbox function EndTiming() { this.this_end_time = GetCurrentTime(); //stamp current time this.this_time_difference = (this.this_end_time - this.this_start_time) / 1000; //compute elapsed time document.TimeDisplayForm.TimeDisplayBox.value = this.this_time_difference; //set elapsed time in display box } var time_object = new timestamp_class(0, 0, 0, 0); //create new time object and initialize it //--> </script> <form> <input type="button" value="开始" onClick="time_object.StartTiming()"; name="StartButton"> </form> <form> <input type="button" value="结束" onClick="time_object.EndTiming()"; name="EndButton"> </form> <form name="TimeDisplayForm"> 经过了: <input type="text" name="TimeDisplayBox" size="6"> 秒 </form> <a href="http://www.aiyiweb.com/js/">欢迎访问爱易网JS特效</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:固定的挂钟
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
苹果已经允许开发者提交64位应用程序
墨迹也要做硬件,工具类应用如何“变异”的
携程整合去哪儿陷入僵局 欲联手老对手艺龙
苹果多色彩!葫芦里究竟卖的什么药
刘强东向总理建言:打击有组织有规模的售假商家
薛蛮子取保后首次发微博表示:辜负你们了
网络文学竞争白热化 百度多酷文学网上线
国美苏宁线上首度正面PK 京东列席4月电商战
快播灭了,还有西瓜:视频网站的灰色江湖还在
推荐阅读
更多>
国内云服务商存在尴尬:“远程机房+移动大硬盘”模式
联想架构调整后:Think品牌或推智能手机
谷歌董事长成花花公子:情史足以媲美涂鸦
快递企业征收“份子钱” 成全了谁 苦了谁?
运营商补贴减少 国内通信业拐点逼近
O2O成"唐僧肉":百度糯米抢食第一口令阿里腾讯颤抖
云储存有多远:跨过数据安全问题即可到达
新浪微博推粉丝头条功能 意欲与大号分成
众贷网满月开张 网络金融监管再受质疑
华为野心布局未来:投资研发5G对赌1毫秒连接
Android应用审核乱象:诈骗软件冲上排行榜首
眼球识别技术EyeVerify融资600万美元 360参投
赴美开店,阿里11Main准备好了吗?
马云寄厚望于物流 “菜鸟”行情暂难持续
“世界杯+618”集体磨刀的本质是绑架全民
高通拼抢国际芯片市场 联发科海外拓展难安心
小米2S试水高端化 纯“性价比”玩法已成过去式
余额宝收益率跌破5% 银行系宝宝收益率赶超
从3G牌照发放看中国4G规划效果
微软为避免代理权争夺 与大股东达成和解协议