日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

              歡迎訪問 生活随笔!

              生活随笔

              當前位置: 首頁 > 前端技术 > HTML >内容正文

              HTML

              html日历修改,HTML精美日历插件

              發布時間:2024/8/1 HTML 32 豆豆
              生活随笔 收集整理的這篇文章主要介紹了 html日历修改,HTML精美日历插件 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

              Html精美日歷插件,包括日期選擇,日期查看,星期查看等等功能。文章末尾附有演示地址。先看看效果圖:

              ?

              ?

              源代碼:var?CalendarHandler?=?{

              currentYear:?0,

              currentMonth:?0,

              isRunning:?false,

              initialize:?function()?{

              $calendarItem?=?this.CreateCalendar(0,?0,?0);

              $("#Container").append($calendarItem);

              $("#context").css("height",?$("#CalendarMain").height()?-?65???"px");

              $("#center").css("height",?$("#context").height()?-?30???"px");

              $("#selectYearDiv").css("height",?$("#context").height()?-?30???"px").css("width",?$("#context").width()???"px");

              $("#selectMonthDiv").css("height",?$("#context").height()?-?30???"px").css("width",?$("#context").width()???"px");

              $("#centerCalendarMain").css("height",?$("#context").height()?-?30???"px").css("width",?$("#context").width()???"px");

              $calendarItem.css("height",?$("#context").height()?-?30???"px");?//.css("visibility","hidden");

              $("#Container").css("height",?"0px").css("width",?"0px").css("margin-left",?$("#context").width()?/?2???"px").css("margin-top",?($("#context").height()?-?30)?/?2???"px");

              $("#Container").animate({

              width:?$("#context").width()???"px",

              height:?($("#context").height()?-?30)?*?2???"px",

              marginLeft:?"0px",

              marginTop:?"0px"

              },?300,?function()?{

              $calendarItem.css("visibility",?"visible");

              });

              $(".dayItem").css("width",?$("#context").width()???"px");

              var?itemPaddintTop?=?$(".dayItem").height()?/?6;

              $(".item").css({

              "width":?$(".week").width()?/?7???"px",

              "line-height":?itemPaddintTop???"px",

              "height":?itemPaddintTop???"px"

              });

              $(".currentItem>a").css("margin-left",?($(".item").width()?-?25)?/?2???"px").css("margin-top",?($(".item").height()?-?25)?/?2???"px");

              $(".week>h3").css("width",?$(".week").width()?/?7???"px");

              this.RunningTime();

              },

              CreateSelectYear:?function()?{

              $(".currentDay").show();

              $("#selectYearDiv").children().remove();

              var?yearindex?=?0;

              for?(var?i?=?this.currentYear?-?5;?i?

              yearindex??;

              if?(i?==?this.currentYear)?$("#selectYearDiv").append($(""???i???""));

              else?$("#selectYearDiv").append($(""???i???""));

              if?(yearindex?==?1?||?yearindex?==?5?||?yearindex?==?9)?$("#selectYearDiv").find("#"???yearindex).css("border-left-color",?"#fff");

              if?(yearindex?==?4?||?yearindex?==?8?||?yearindex?==?12)?$("#selectYearDiv").find("#"???yearindex).css("border-right-color",?"#fff");

              }

              $("#selectYearDiv>div").css("width",?($("#center").width()?-?4)?/?4???"px").css("line-height",?($("#center").height()?-?4)?/?3???"px");

              $("#centerMain").animate({

              marginLeft:?"0px"

              },?300);

              },

              CreateSelectMonth:?function()?{

              $(".currentDay").show();

              $("#selectMonthDiv").children().remove();

              for?(var?i?=?1;?i?

              if?(i?==?this.currentMonth)?$("#selectMonthDiv").append($(""???i???"月"));

              else?$("#selectMonthDiv").append($(""???i???"月"));

              if?(i?==?1?||?i?==?5?||?i?==?9)?$("#selectMonthDiv").find("#"???i).css("border-left-color",?"#fff");

              if?(i?==?4?||?i?==?8?||?i?==?12)?$("#selectMonthDiv").find("#"???i).css("border-right-color",?"#fff");

              }

              $("#selectMonthDiv>div").css("width",?($("#center").width()?-?4)?/?4???"px").css("line-height",?($("#center").height()?-?4)?/?3???"px");

              $("#centerMain").animate({

              marginLeft:?-$("#center").width()?*?2???"px"

              },?300);

              },

              IsRuiYear:?function(aDate)?{

              return?(0?==?aDate?%?4?&&?(aDate?%?100?!=?0?||?aDate?%?400?==?0));

              },

              CalculateWeek:?function(y,?m,?d)?{

              if?(m?==?1)?{

              m?=?13;

              y--;

              }

              if?(m?==?2)?{

              m?=?14;

              y--;

              }

              var?week?=?(d???2?*?m???3?*?(m???1)?/?5???y???y?/?4?-?y?/?100???y?/?400)?%?7???1;

              return?week;

              },

              CalculateMonthDays:?function(m,?y)?{

              var?mDay?=?0;

              if?(m?==?0?||?m?==?1?||?m?==?3?||?m?==?5?||?m?==?7?||?m?==?8?||?m?==?10?||?m?==?12)?{

              mDay?=?31;

              }?else?{

              if?(m?==?2)?{

              //判斷是否為芮年

              var?isRn?=?this.IsRuiYear(y);

              if?(isRn?==?true)?{

              mDay?=?29;

              }?else?{

              mDay?=?28;

              }

              }?else?{

              mDay?=?30;

              }

              }

              return?mDay;

              },

              CreateCalendar:?function(y,?m,?d)?{

              $dayItem?=?$("");

              //獲取當前月份的天數

              var?nowDate?=?new?Date();

              if(y==nowDate.getFullYear()&&m==nowDate.getMonth()?1||(y==0&&m==0))

              $(".currentDay").hide();

              var?nowYear?=?y?==?0???nowDate.getFullYear()?:?y;

              this.currentYear?=?nowYear;

              var?nowMonth?=?m?==?0???nowDate.getMonth()???1?:?m;

              this.currentMonth?=?nowMonth;

              var?nowDay?=?d?==?0???nowDate.getDate()?:?d;

              $(".selectYear").html(nowYear???"年");

              $(".selectMonth").html(nowMonth???"月");

              var?nowDaysNub?=?this.CalculateMonthDays(nowMonth,?nowYear);

              //獲取當月第一天是星期幾

              //var?weekDate?=?new?Date(nowYear?"-"?nowMonth?"-"?1);

              //alert(ss.getDay());

              var?nowWeek?=?parseInt(this.CalculateWeek(nowYear,?nowMonth,?1));

              //var?nowWeek=weekDate.getDay();

              //獲取上個月的天數

              var?lastMonthDaysNub?=?this.CalculateMonthDays((nowMonth?-?1),?nowYear);

              if?(nowWeek?!=?0)?{

              //生成上月剩下的日期

              for?(var?i?=?(lastMonthDaysNub?-?(nowWeek?-?1));?i?

              $dayItem.append(""???(i???1)???"");

              }

              }

              //生成當月的日期

              for?(var?i?=?0;?i?

              if?(i?==?(nowDay?-?1))?$dayItem.append(""???(i???1)???"");

              else?$dayItem.append(""???(i???1)???"");

              }

              //獲取總共已經生成的天數

              var?hasCreateDaysNub?=?nowWeek???nowDaysNub;

              //如果小于42,往下個月推算

              if?(hasCreateDaysNub?

              for?(var?i?=?0;?i?<=?(42?-?hasCreateDaysNub);?i??)?{

              $dayItem.append(""???(i???1)???"");

              }

              }

              return?$dayItem;

              },

              CSS:?function()?{

              var?itemPaddintTop?=?$(".dayItem").height()?/?6;

              $(".item").css({

              "width":?$(".week").width()?/?7???"px",

              "line-height":?itemPaddintTop???"px",

              "height":?itemPaddintTop???"px"

              });

              $(".currentItem>a").css("margin-left",?($(".item").width()?-?25)?/?2???"px").css("margin-top",?($(".item").height()?-?25)?/?2???"px");

              },

              CalculateNextMonthDays:?function()?{

              if?(this.isRunning?==?false)?{

              $(".currentDay").show();

              var?m?=?this.currentMonth?==?12???1?:?this.currentMonth???1;

              var?y?=?this.currentMonth?==?12???(this.currentYear???1)?:?this.currentYear;

              var?d?=?0;

              var?nowDate?=?new?Date();

              if?(y?==?nowDate.getFullYear()?&&?m?==?nowDate.getMonth()???1)?d?=?nowDate.getDate();

              else?d?=?1;

              $calendarItem?=?this.CreateCalendar(y,?m,?d);

              $("#Container").append($calendarItem);

              this.CSS();

              this.isRunning?=?true;

              $($("#Container").find(".dayItem")[0]).animate({

              height:?"0px"

              },?300,?function()?{

              $(this).remove();

              CalendarHandler.isRunning?=?false;

              });

              }

              },

              CalculateLastMonthDays:?function()?{

              if?(this.isRunning?==?false)?{

              $(".currentDay").show();

              var?nowDate?=?new?Date();

              var?m?=?this.currentMonth?==?1???12?:?this.currentMonth?-?1;

              var?y?=?this.currentMonth?==?1???(this.currentYear?-?1)?:?this.currentYear;

              var?d?=?0;

              if?(y?==?nowDate.getFullYear()?&&?m?==?nowDate.getMonth()???1)?d?=?nowDate.getDate();

              else?d?=?1;

              $calendarItem?=?this.CreateCalendar(y,?m,?d);

              $("#Container").append($calendarItem);

              var?itemPaddintTop?=?$(".dayItem").height()?/?6;

              this.CSS();

              this.isRunning?=?true;

              $($("#Container").find(".dayItem")[0]).animate({

              height:?"0px"

              },?300,?function()?{

              $(this).remove();

              CalendarHandler.isRunning?=?false;

              });

              }

              },

              CreateCurrentCalendar:?function()?{

              if?(this.isRunning?==?false)?{

              $(".currentDay").hide();

              $calendarItem?=?this.CreateCalendar(0,?0,?0);

              $("#Container").append($calendarItem);

              this.isRunning?=?true;

              $($("#Container").find(".dayItem")[0]).animate({

              height:?"0px"

              },?300,?function()?{

              $(this).remove();

              CalendarHandler.isRunning?=?false;

              });

              this.CSS();

              $("#centerMain").animate({

              marginLeft:?-$("#center").width()???"px"

              },?500);

              }

              },

              RunningTime:?function()?{

              var?mTiming?=?setInterval(function()?{

              var?nowDate?=?new?Date();

              var?nowTime?=?nowDate.getHours()???":"???nowDate.getMinutes()???":"???nowDate.getSeconds();

              $("#footNow").html(nowTime);

              },?1000);

              }

              }

              總結

              以上是生活随笔為你收集整理的html日历修改,HTML精美日历插件的全部內容,希望文章能夠幫你解決所遇到的問題。

              如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。

              主站蜘蛛池模板: 不卡免费av | 免费网站91| 巨乳女教师的诱惑 | 穿扒开跪着折磨屁股视频 | 亚洲区在线 | 无码人妻丰满熟妇啪啪网站 | 亚洲欧洲精品在线 | 99久久免费国产精精品 | 成年人黄色 | 琪琪伦伦影院理论片 | 国产老女人乱淫免费可以 | 一区二区手机在线 | 久久亚洲一区二区 | 91视频免费看片 | 国产毛片久久久久久国产毛片 | av站| 亚洲人在线 | 亚洲成人诱惑 | 日本免费黄视频 | 日韩欧美视频一区二区 | 亚洲福利电影网 | 国产影视av | 999国产精品亚洲77777 | 中文在线观看免费视频 | 久久色播 | 日韩白浆 | 1024福利| 亚洲av无码国产在丝袜线观看 | 亚洲91在线 | 无码人妻一区二区三区免费 | 亚洲精品乱码久久久久久日本蜜臀 | 66亚洲一卡2卡新区成片发布 | 白嫩初高中害羞小美女 | 国产精品一区二区三区免费在线观看 | 瑟瑟综合 | 国产精品久久久久久免费观看 | 欧美一卡二卡在线 | 女同av在线播放 | 久久aaaa片一区二区 | 亚洲一级二级三级 | 两个小y头稚嫩紧窄h文 | 性欢交69精品久久久 | 欧美在线观看免费高清 | 无码少妇一区二区 | 久草福利资源 | 亚洲综合色av | 麻豆av影院| 国产精品视频无码 | 亚洲欧美国产一区二区三区 | 日本理论中文字幕 | 已婚少妇美妙人妻系列 | 国产精品16p| 91干干干 | 国产一级久久久久毛片精品 | 国产剧情一区 | 极品少妇xxxx精品少妇 | 小向美奈子在线观看 | 影音先锋亚洲资源 | 911香蕉| 久久国产精品久久国产精品 | 成人性生交免费看 | 成人免费淫片aa视频免费 | 偷偷操av | 91精品一区二区三区在线观看 | 黑人巨大精品欧美一区二区 | 91成品视频 | 国产女人视频 | 国产农村妇女毛片精品久久麻豆 | 午夜免费小视频 | 国产三级av在线 | 国产在线观看免费av | 高潮一区二区三区乱码 | 国产二级一片内射视频播放 | 91看视频 | 欧美精品亚洲精品日韩精品 | 91污在线观看 | 狠狠干一区二区 | 亚洲天堂自拍 | 亚洲最大av在线 | 99黄色网 | 午夜视频成人 | 动漫av一区| 男人的天堂手机在线 | 亚洲福利视频一区二区三区 | 麻豆网页| 羞羞的软件 | 巨茎人妖videos另类 | 久久久xxx | 久久免费视频一区 | 嫩色av | 欧美日韩一区在线播放 | 成人在线看片 | 高清日韩一区二区 | 97夜夜操 | 国产成人精品久久二区二区 | 亚洲大尺度在线 | 亚洲国产精品狼友在线观看 | 欧美美女性生活视频 | 国产极品美女在线 |