爱易网
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 浏览次数:20276 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<body>区域中 <script> function Year_Month(){ var now = new Date(); var yy = now.getYear(); var mm = now.getMonth()+1; var cl = '<font color="#0000df">'; if (now.getDay() == 0) cl = '<font color="#c00000">'; if (now.getDay() == 6) cl = '<font color="#00c000">'; return(cl + yy + '年' + mm + '月</font>'); } function Date_of_Today(){ var now = new Date(); var cl = '<font color="#0000df">'; if (now.getDay() == 0) cl = '<font color="#c00000">'; if (now.getDay() == 6) cl = '<font color="#00c000">'; return(cl + now.getDate() + '</font>'); } function Day_of_Today(){ var day = new Array(); day[0] = "星期日"; day[1] = "星期一"; day[2] = "星期二"; day[3] = "星期三"; day[4] = "星期四"; day[5] = "星期五"; day[6] = "星期六"; var now = new Date(); var cl = '<font color="#0000df">'; if (now.getDay() == 0) cl = '<font color="#c00000">'; if (now.getDay() == 6) cl = '<font color="#00c000">'; return(cl + day[now.getDay()] + '</font>'); } function CurentTime(){ var now = new Date(); var hh = now.getHours(); var mm = now.getMinutes(); var ss = now.getTime() % 60000; ss = (ss - (ss % 1000)) / 1000; var clock = hh+':'; if (mm < 10) clock += '0'; clock += mm+':'; if (ss < 10) clock += '0'; clock += ss; return(clock); } function refreshCalendarClock(){ document.all.calendarClock1.innerHTML = Year_Month(); document.all.calendarClock2.innerHTML = Date_of_Today(); document.all.calendarClock3.innerHTML = Day_of_Today(); document.all.calendarClock4.innerHTML = CurentTime(); } function getCalendarClockFreeCodeMsg(nn){ if (nn == 'off') CalendarClockFreeCode.style.visibility = 'hidden'; else { CalendarClockFreeCode.style.visibility = 'visible'; setTimeout("getCalendarClockFreeCodeMsg('off')",10000); } } var webUrl = webUrl; function calendarClockFreeCode(){ var win = window.open('about:blank','_blank','width=300,height=260,top=0,left=0'); win.document.writeln('<'+'script language="JavaScript">'); win.document.writeln('var autoClose = setTimeout("window.close()",30000)'); win.document.writeln('</'+'script>'); win.document.writeln('<p align="center"><a style="cursor:hand"'); win.document.writeln(' onclick="clearTimeout(autoClose)">请点击此处,否则<br>30秒后此窗口将自动关闭</a></p>'); win.document.writeln('<p>想在自己的网站上添加带日历时钟的朋友,请将下面框中的代码贴到网页的适当地方就可以了<br>'); win.document.writeln('<textarea rows="4" cols="30">'); win.document.writeln('<script>'); win.document.writeln('function Year_Month(){ '); win.document.writeln('var now = new Date(); '); win.document.writeln('var yy = now.getYear(); '); win.document.writeln('var mm = now.getMonth()+1; '); win.document.writeln('var cl = \'<font color="#0000df">\'; '); win.document.writeln('if (now.getDay() == 0) cl = \'<font color="#c00000">\'; '); win.document.writeln('if (now.getDay() == 6) cl = \'<font color="#00c000">\'; '); win.document.writeln('return(cl + yy + \'年\' + mm + \'月<\/font>\'); '); win.document.writeln('}'); win.document.writeln('function Date_of_Today(){ '); win.document.writeln(' var now = new Date(); '); win.document.writeln(' var cl = \'<font color="#0000df">\'; '); win.document.writeln(' if (now.getDay() == 0) cl = \'&l
上一篇:狡猾的按钮特效
下一篇:测算年度星期数
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
PC迎9年来出货量新低 平板电脑渐成主流
评论:阿里为什么不试着收购一家香港媒体呢
不提老罗,不说情怀,仅从十四个投诉问题入手谈锤子手机
完美入股盛大:一桩各怀心事的交易
苹果MacBook Air劣势渐显 或推新产品改变命运
首家国有独资P2P平台上线 或预示政策日渐明朗
运营商补贴减少 国内通信业拐点逼近
亚马逊第三方平台真的卖盗版书?
唯品会荣登“最贵中概股”的欢喜与哀愁
推荐阅读
更多>
工商下月将整治手机市场
打车软件火了 恶性循环来了
全球五大电信设备商业绩:华为净利居首
联想架构调整后:Think品牌或推智能手机
迅雷欲3300万美元收购金山快盘 预计9月完成
O2O成"唐僧肉":百度糯米抢食第一口令阿里腾讯颤抖
摩托罗拉中国区将再裁员 助力公司变身
OPPO Find7体验测 Find7综测
喜大普奔:2016年国内乘客有望在飞机上使用手机
史玉柱谈创业:5大建议 失败的教训最真实
银河证券王锦炎:金融业如何使用大数据
从雷军的“互联网七字诀”告诉你一个非妖魔化的小米
解析2014年阿里百度等五大互联网巨头深度布局
同程旅游融资后变土豪 如何烧钱占领市场?
国美苏宁线上首度正面PK 京东列席4月电商战
支付宝钱包支持医保移动缴费 广州成首个试点
“组合拳”怎么打 拆解小米新玩法
科技巨匠体验谷歌眼镜:戴上了就不想摘上去
分析称iPhone 6明年初发布 屏幕变为4.8吋
百视通:Xbox One汉化获批 游戏迷欢呼吧