域名注册
|
虚拟主机
|
数据库
|
设为主页
|
加入收藏
|
天诚搜索
|
RSS
网站套餐
Package
基础特惠型网站
企业标准型网站
企业大户型网站
商务政务型网站
功能单项报价表
最新推荐
Recommended
4年网络创业经历
Dreamweaver表格经验谈
61.183.41.123数据重新上传通…
局域网arp病毒
用途相似的标签
CSS网页标准制作关于网页表单…
中国互联网13年大事记
ECSHOP 显示指定分类下的文章…
您现在的位置:
天诚世纪
>>
技术中心
>>
网页特效
>>
时间日期
>> 正文
Form中的时钟
作者:
天诚世纪
更新时间:2009-6-13 10:13:39
来源:
天诚世纪
以下是HTML网页特效代码,点击运行按钮可查看效果:
<html> <head> <title>网页特效|Form中的时钟</title> <style type="text/css"> <!-- body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px} A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none } A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline } a:active { font: 9pt "宋体"; cursor: hand; color: #FF0033 } --> </style> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body onLoad="startclock();"> <br> <br> <center><font color=red face="隶书" size=6>Form中的时钟</font></center> <br> <br><center> <table border=0 bordercolor=blue borderlight=green style="border-collapse: collapse" cellpadding="0" cellspacing="0"> <tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面为效果显示区!</strong></font></td></tr><tr><td align=center><script language="JavaScript"> <!-- 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) ? hours - 12 : hours) timeValue += ((minutes < 10) ? ":0" : ":") + minutes timeValue += ((seconds < 10) ? ":0" : ":") + seconds if (hours>=6 && hours<=12) {timeValue += ("上午")} if(hours>12 && hours<=18) {timeValue += ("下午")} if(hours>18 && hours <=24) {timeValue +=("晚上")} if(hours<6) {timeValue += ("深夜")} document.clock.face.value = timeValue timerID = setTimeout("showtime()",1000) timerRunning = true } //--> </script> <form method="POST" name="clock"> <p> <input type="text" name="face" size="11" style="font-size: 9pt"> </p> </form></td></tr> </table></center> <br> <br> <center> <SCRIPT LANGUAGE="JavaScript"> <!-- hide function goHist(a) { history.go(a); } //--> </script></center> <br> <br> </body> </html>
[提示:可先修改代码再按运行]
本文链接:http://www.tc-21.com/ITCenter/200906/20090613101339.html
上一篇文章:
立体显示的时钟
下一篇文章:
农历日历
更多关于
时间日期
的新闻
相关文章
农历日历
立体显示的时钟
显示特殊节日脚本
退出时显示访问时间
各种风格时间显示
使时钟显示在任意指定的位置
倒计时
爪哇日历
::::::
网页模板
|
建站指导
|
视频教程
|
图片中心
|
在线咨询
|
网站运营
|
网站推广
|
图片素材
::::::
CopyRight 2007 All Rights Reserved 天诚世纪 版权所有
鄂ICP备12000046号
联系电话:18995527083 18995527081 QQ:448163207 32301667 Email:my_tc@126.com
::::::搜索关键字:
武汉网站制作
|
武汉做网站
|
武汉网站建设
|
武汉网页制作
|
天诚世纪
|
武汉网页制作公司
|
网页模板
|::::::