爱易网
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 LANGUAGE="JavaScript"> <!-- Begin var now = new Date(); var month_array = new Array("january","february","march","April","May","June","July","August","September","October","November","December"); document.write("<form name=date_list><table bgcolor=silver><tr><td>"); document.write("<select name=month onchange=change_month(this.options.selectedIndex)>"); for(i=0;i<month_array.length;i++) { if (now.getMonth() != i) {document.write ("<option value="+i+">"+month_array[i]);} else {document.write ("<option value="+i+" selected>"+month_array[i]);} } document.write("</select>"); document.write("</td><td>"); document.write ("<select name=year onchange=change_year(this.options[this.options.selectedIndex])>"); for(i=1950;i<3000;i++) { if (now.getYear() != i) {document.write("<option value="+i+">"+i);} else {document.write("<option value="+i+" selected>"+i);} } document.write("</select></td></tr><tr><td colspan=2><center>"); document.write("<table bgcolor=white border=0 cellspacing = 0 cellpading = 0 width=100%><tr bgcolor=gray align=center>"); document.write("<td><font color=silver>M</font></td><td><font color=silver>T</td><td><font color=silver>W</td><td><font color=silver>T</td><td><font color=silver>F</td><td ><font color=silver>S</td><td ><font color=silver>S</td>"); document.write("</tr><tr>"); for(j=0;j<6;j++) { for(i=0;i<7;i++) { document.write("<td align=center id=d"+i+"r"+j+"></td>") } document.write("</tr>"); } document.write("</table>"); document.write("</center></form></td></tr></table>"); var show_date = new Date(); function set_cal(show_date) { begin_day = new Date (show_date.getYear(),show_date.getMonth(),1); begin_day_date = begin_day.getDay(); end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1); count_day = (end_day - begin_day)/1000/60/60/24; input_table(begin_day_date,count_day); } set_cal(show_date); function input_table(begin,count) { init(); j=0; if (begin!=0){i=begin-1;}else{i=6} for (c=1;c<count+1;c++) { colum_name = eval("d"+i+"r"+j); if ((now.getDate() == c)&&(show_date.getMonth() == now.getMonth())&&(show_date.getYear() == now.getYear())) {colum_name.style.backgroundColor = "blue";colum_name.style.color = "white";}; colum_name.innerText = c; i++; if (i==7){i=0;j++;} } } function init() { for(j=0;j<6;j++) { for(i=0;i<7;i++) { colum_name = eval("d"+i+"r"+j); colum_name.innerText = "-"; colum_name.style.backgroundColor =""; colum_name.style.color =""; } } } function change_month(sel_month) { show_date = new Date(show_date.getYear(),sel_month,1); set_cal(show_date); } function change_year(sel_year) { sel_year = sel_year.value; show_date = new Date(sel_year,show_date.getMonth(),1); set_cal(show_date); } // End --> </script> <a href="http://www.aiyiweb.com/js/">欢迎访问爱易网JS特效</a>
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行]
上一篇:狡猾的按钮特效
下一篇:最简单的时钟
免责声明:
本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
相关资料
更多>
八位知名设计师评iOS7:新鲜但复杂
酷派首抓4G时机大丰收,未来份额必降无疑
一个非脑残米粉的思考:小米“成功之道”如何炼成
北京电信推“0月租卡”,同网通话免费
神州电脑中止IPO面前:再被质疑财务造假
微信企业号必须搬走四座大山,否则只能铩羽而归!
迅雷向美SEC提交IPO招股书:拟最多筹资1亿美元
App Store严禁推送广告 运用面临大清洗
MIUI,有了它小米就无惧对手
推荐阅读
更多>
网络文学竞争白热化 百度多酷文学网上线
HDS发布《2013中国CIO洞察白皮书》
传谷歌开发者大会发布Android 4.3 并非5.0版本
微软为避免代理权争夺 与大股东达成和解协议
惠普董事长莱恩辞职 为巨额财务减记埋单
继续涨:微博IPO第二交易日 收盘大涨11.71%
杨元庆去年总薪酬1.33亿元
广东移动董事长徐龙受调查 圈内对其褒贬不一
Docker Desktop 4.11 发布:支持虚拟桌面、Mac 权限更改和新扩展
联发科享用价钱战 专利难以摆脱高通
史玉柱谈创业:5大建议 失败的教训最真实
网络旅行游记被曝插入"软广告" 个别人士月入数万
腾讯为何在与阿里百度的收购比赛中当看客?
从旗下三大业务BG发展看华为的过去现在和未来
打车软件火了 恶性循环来了
快递企业征收“份子钱” 成全了谁 苦了谁?
喜大普奔:2016年国内乘客有望在飞机上使用手机
马斯克的特斯拉能否保持好势头
任正非:华为决不上市 上市公司股东贪婪而短视
HTC的三大迷惘:高管釜底抽薪 产品营销战略混乱