>
设为首页
>
收藏本站
>
最新电影
首页
运营资讯
今日英语
图形图像
计算机技术
Asp编程
网站结构化
资源共享
休闲娱乐
访问新站
您现在的位置:
首页
=>
后台技术
=>
脚本特效
=>
时间日期
订阅本栏目
非常酷的日历,挂历
时间: 2008-01-13 23:41:33 阅读次数:1920
非常酷的日历,挂历
<html> <head> <title>网页特效|www.ffasp.com 飞飞Asp乐园|---Cool日历</title> </head><BODY background="../images/bg.gif"> <!--将以下代码加入HTML的<Body></Body>之间--> <script language="JavaScript"> <!-- Hide this script from old browsers -- function greeting() { var today = new Date(); var hrs = today.getHours(); document.writeln("<CENTER>"); document.write("Good "); if (hrs < 6) document.write("(Early) Morning"); else if (hrs < 12) document.write("Morning"); else if (hrs <= 18) document.write("Afternoon"); else document.write("Evening"); document.write("!"); document.write("当前时间是:"); dayStr = today.toLocaleString(); document.write(dayStr); document.writeln("</CENTER>"); } function montharr(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11) { this[0] = m0; this[1] = m1; this[2] = m2; this[3] = m3; this[4] = m4; this[5] = m5; this[6] = m6; this[7] = m7; this[8] = m8; this[9] = m9; this[10] = m10; this[11] = m11; } function calendar() { var today = new Date(); var thisDay; var monthDays = new montharr(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); year = today.getYear(); if (year<2000) year=year+1900; thisDay = today.getDate(); if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) monthDays[1] = 29; nDays = monthDays[today.getMonth()]; firstDay = today; firstDay.setDate(1); // works fine for most systems testMe = firstDay.getDate(); if (testMe == 2) firstDay.setDate(0); startDay = firstDay.getDay(); document.writeln("<CENTER>"); document.write("<TABLE BORDER bgcolor=moccasin>"); document.write("<TR><TH COLSPAN=7>"); document.write(year+'年'); document.write(today.getMonth()+1+'月'); document.write("<TR><TH>日<TH>一<TH>二<TH>三<TH>四<TH>五<TH>六"); document.write("<TR>"); column = 0; for (i=0; i<startDay; i++) { document.write("<TD>"); column++; } for (i=1; i<=nDays; i++) { document.write("<TD>"); if (i == thisDay) document.write("<FONT COLOR=\"red\">") document.write(i); if (i == thisDay) document.write("</FONT>") column++; if (column == 7) { document.write("<TR>"); column = 0; } } document.write("</TABLE>"); document.writeln("</CENTER>"); } greeting(); document.write("<br>"); calendar(); document.write(""); // -- End Hiding Here --> </script> </body></html>
提示:您可以先修改部分代码再运行
飞飞Asp,技术乐园
站内搜索
:
标题
内容
下一篇
在表单中显示页面停留时间
上一篇
日期输入控件
本栏目最新
栏目最新列表
符合标准的时间选择控件
js选择日期(可以选择开始结束时间)
带对勾的日期选择控件 蓝色
蓝色日历控件 只能选择日期
10秒倒计时的JS代码
网站优化策划
栏目最新列表
增加网站外链的快速方法
网站上线前必做的30个检查
新的友情链接参考标准(没有google的PR情况
优化Google的AdSense广告的五个工具
王通讲SEO八大基础
站点最新
站点最新列表
微博推广的一些技巧
xhEditor v1.1.7 发布,
收集的一些轻量级非常实
50个新鲜兼容最新版本的
javascript中cookie的设
Excel中出现#VALUE!、#D
jquery插件:飞飞表情插件
十个使用HTML5开发的精彩
支持HTML5的浏览器有哪些
飞妮莫属:漫画:如何写出
历史最热10条信息
MIME介绍 及
[
1
] [
2
] [
3
]
巧用Google和迅雷来下载
Transact SQL 常
[
1
] [
2
]
VIA Rhine II Fast Ethe
电脑常用端
[
1
] [
2
] [
3
]
Do you get a kick out
十道羊皮卷 欣赏+mp3版+
每日一句:A friend and
每日一句:Theres no tu
经典__悟透JavaScript
伟哥博客
西安房产
123最新电影
三四六四
关于站点
|
免责声明
|
联系站长
|
网站地图
|
陕ICP备07002804号
WEB技术QQ交流群:72840059
©2007 ffasp.com. 版权所有