动态时间代码.HTML

上传人:灯火****19 文档编号:125156136 上传时间:2020-03-15 格式:PDF 页数:2 大小:52.73KB
返回 下载 相关 举报
动态时间代码.HTML_第1页
第1页 / 共2页
动态时间代码.HTML_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《动态时间代码.HTML》由会员分享,可在线阅读,更多相关《动态时间代码.HTML(2页珍藏版)》请在金锄头文库上搜索。

1、 var timerID null var timerRunning false function stopclock if timerRunning clearTimeout timerID timerRunning false function startclock stopclock showtime function showtime var now new Date var hours now getHours var minutes now getMinutes var seconds now getSeconds var timeValue hours 12 PM AM time

2、Value hours 12 hours 12 hours timeValue minutes 10 0 minutes timeValue seconds 10 0 seconds document clock thetime value timeValue timerID setTimeout showtime 1000 timerRunning true var enabled 0 today new Date var day var date if today getDay 0 day 星期日 if today getDay 1 day 星期一 if today getDay 2 day 星期二 if today getDay 3 day 星期三 if today getDay 4 day 星期四 if today getDay 5 day 星期五 if today getDay 6 day 星期六 document fgColor 000000 date 当前时间为 today getFullYear 年 today getMonth 1 月 today getDate 日 day document write date

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 大学课件

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号