爱易网
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 浏览次数:20182 次
欢迎光临爱易网网页脚本特效中心,点击运行按钮演示特效:
以下是程序代码
脚本说明: 把如下代码加入<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
上一篇:狡猾的按钮特效
下一篇:测算年度星期数
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
第二梯队也PK:当1号店“遇上”京东手机节
快递企业征收“份子钱” 成全了谁 苦了谁?
联发科享用价钱战 专利难以摆脱高通
聚美优品获基石投资1.5亿美金,IPO吃下定心丸
联想国庆完成收购IBM x86服务器
阿里巴巴上市后雅虎将面临更大的业绩压力
iPhone 6 Plus要召回是谣言
全球五大电信设备商业绩:华为净利居首
苹果优势逐渐丧失 传即将推出廉价iPhone
推荐阅读
更多>
牟贵先挂帅 国美在线“价钱战”昔日开打
网易微博将正式关闭 用户迁至轻博客LOFTER
微软的云服务显示出他们将自我进化
用户喊话当当网:我彻底把你们丢弃了
广电总局回应美剧下架:不是所有信息可公开
称产品遭诋毁 奇虎再诉百度
天音通信170套餐试商用放号:流量两年不清零
工商总局开查电商“七日退货”
史上最严电话实名制9月实行 三大难题待解
联发科享用价钱战 专利难以摆脱高通
中电信率先推移动转售业务 中下旬批量上市
一个非脑残米粉的思考:小米“成功之道”如何炼成
传诺基亚Lumia928下月推出 将与iPhone5看齐
2018年阿里云双11活动如何参加?1折优惠大攻略
中电信国际漫游费下调85% 世界杯上网28元/天
打车App就是下一个团购骗局!?
腾讯微信昨晚再现大规模故障 多地受到影响
一大波智能路由器正在袭来:小米、360、极路由大PK
支付宝曝平安破绽:转账信息被谷歌抓取
评论:阿里为什么不试着收购一家香港媒体呢