In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the js+html how to make a simple calendar related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone after reading this js+html how to make a simple calendar article will have a harvest, let's take a look at it.
Code:
Untitled document * {margin: 0politics padding: 0} # calendar {width: 210pxposition: 100px auto;overflow: hidden;border: 1px solid # 000position: relative} # calendar h5 {text-align: center;margin-bottom: 10px} # calendar .a1 {position: absolute;top: 20pxleft: 20px;} # calendar .a2 {position: absolute;top: 20pxright: 20px;} # calendar .week {height: 30pxscape linelight height: 20pxbot borderhouse bottom: 1px solid # 000000 Margin-bottom: 10px} # calendar. Week li {float: left;width: 30pxposition height: 30pxten textreconcilion: center;list-style: none;} # calendar .dateList {overflow: hidden;clear: both} # calendar .dateList li {float: left;width: 30pxpolitical height: 30pxpolitical textAfter alignment: center;line-height: 30pxlistscapestyle: none;} # calendar .dateList .ccc {color: # ccc;} # calendar .dateList .red {background: # F90color: # fff } # calendar .dateList .sun {color: # f00;} $(function () {/ / necessary data / / Today of the year, month and Day The total number of days of this month; what day is the first day of this month? Var iNow=0; function run (n) {var oDate = new Date (); / / define time oDate.setMonth (oDate.getMonth () + n); / / set month var year = oDate.getFullYear (); / / year var month = oDate.getMonth (); / / month var today = oDate.getDate () / / calculate the number of days in the month var allDay = [31, 28, 31, 30, 31, 30, 31, 31, 31, 30, 31] [month]; / / determine the leap year if (month = = 1) {if (year% 4 = = 0 & year% 100! = 0 | | year% 400 = = 0) {allDay = 29;}} / / determine what day the first day of the month is oDate.setDate (1) / / adjust the time to the first day of this month var week = oDate.getDay (); / / read the day of the week / / console.log (week); $(".dateList"). Empty (); / / each time empty / / insert blank for (var I = 0; I < week; iTunes +) {$(".dateList"). Append ("");} / date insert into dateList for (var I = 1; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.