Personalized Calendar

xiaoxiao2021-03-06  90

- - Select Date - - </ Title> <script> // ************************* Calendar control ****** ********************** // Cody by [star]. SJZ 2003-10-31 // Description: The return value is a string // format as follows : // How to use: // var DataString = ShowModalDialog ("Calendar.htm", "DD Day MM YYYY YYY YYY", "DialogWidth: 286px; DialogHeight: 221px; Status: no; help: NO;");</p> <p>Var userformatstring;</p> <p>IF (window.dialogarguments == null) {userformatstring = "yyyy-mm - dd";} else {userformatstring = window.dialogarguments;}</p> <p>With (New Date ()) {var nyear = getYear (); var nmonth = getMonth () 1; var ndate = getdate ();</p> <p>WINDOW.RETURNVALUE = New DataObj (Nyear, NMONTH, NDATE) .GETDATESTRING (Userformatstring);</p> <p>Window.Document.onclick = function () {var obj = window.event.srcelement; if (obj.tagname.tolowercase () == "span" && obj.parentnode.classname.Replace (/ ctable / ig, "star" ) == "star") {trei} Catch (e) {} nyear = obj.RuntimeSty.csstext = ";} catch (e)} nyear = obj.id.split (" - ") [0]; nmonth = obj.id. split ( "-") [1]; ndate = obj.id.split ( "-") [2]; window.currentActiveItem = obj; window.currentSelectDate = window.currentActiveItem.id; window.currentActiveItem.runtimeStyle.cssText = "Background: URL (http://www.5d.cn/bbs/uploadfiles/2003-10/3120401281018.gif) No-repeat 12px 6px; color: # 000; padding-top: 1px; font-weight: bold" }}</p> <p>Function Dataobj (Year, Month, Date) {this.year = year this.month = month this.date = Date this.getdateString = function (formatstring) {Return FormatString.Replace (/ YYYY / IG, this.Year) .replace (/ mm / ig, this.month) .replace (/ DD / IG, this.date)}}</p> <p>window.onload = function () {window.document.attachEvent ( "onclick", doCmd); window.document.attachEvent ( "onmouseover", buttonOver); window.document.attachEvent ( "onmouseout", buttonOut); window.document .attachEvent ( "onmousedown", buttonDown); window.document.attachEvent ( "onmouseup", buttonUp); window.document.attachEvent ( "ondblclick", function () {var obj = window.event.srcElement; if (obj. Tagname.tolowercase () == "span" && obj.parentnode.classname.replace (/ ctable / ig, "star") == "star") {var mydate = new dataobj (obj.id.split ("-" [0], obj.id.split ("-") [1], obj.id.split ("-") [2]); window.ReturnValue = mydate.getdateString (userformatstring) Window.close (); }});</p> <p>document.all.titleYear.innerHTML = TranYearMonthTitle (Nyear, Nmonth); document.all.weekNameBox.insertAdjacentHTML ( "afterBegin", makeWeekNameHtmlStr ()); document.all.calendarBox.innerHTML = makeCalendarHtmlStr (Nyear, Nmonth); window.currentSelectDate = starCaTran (nyear, nmonth, ndate); window.document.all.calendarBox.show = show; window.currentActiveItem = window.document.getElementById (currentSelectDate); if (window.currentActiveItem) window.currentActiveItem.click (); window .Document.all.calendarbox.show ();</p> <p>Function Starcalendar (Year, Month) {this.Year = Year; this.month = month; this.monthtable = function () {var amonth = new array (); for (i = 1; i <7; i ) AMONTH [ I] = new array (i); var dcaldate = new date (this.year, this.month-1, 1); var iDayoffirst = dcaldate.getday (); var iDaysinmonth = new date (this.year, this.month 0) .Getdate (); var ioffsetlast = new date (this.Year, this.month-1, 0) .getdate () - iDayoffirst 1; var iDate = 1; var iDate = 1;</p> <p>For (D = 0; D <7; D ) AMONTH [1] [D] = (D <iDayoffirst)? (- iDayoffirst D 1): iDate ; for (w = 2; W <7; W ) for (D = 0; D <7; D ) AMONTH [W] [D] = iDate ; returnous amonth;}} function makeweeknamehtmlstr () {var tmpstr = ""; var weekname = ["Japan", "a", " "2", "three", "four", "five", "six"]; for (var i = 0; i <7; i ) Tmpstr = "<span class = weekname>" weekname [i] " </ span> "; return tmpStr;} function makeCalendarHtmlStr (year, month) {window.theCalendar = new starCalendar (year, month); var theCaArr = theCalendar.monthTable (); var theDaysInMonth = new Date (year, month, 0 ) .Getdate (); var thecahtml = "<div class = ctable>"; for (var i = 1; i <7; i ) for (var j = 0; j <7; j ) thecahtml = thecahtml <span Class = " ((Thecaarr [i] [j] <1 || thecaarr [i] [j]> itDaysinmonth)?" THERMONTHDATE ":" cdate ") " id = " Starcatran (Year, Month, Thecaarr) I] [J]) ">" Starcatran (Year, Month, Thecaarr [i] [J]). Split ("-") [2] </ span> "; returnate thecahtml " </ div> "} Function Starcatran (Year, Month, Date) {with (New Date (Year (Year, Month-1, Date) Return getYear () " - " (Get Month () 1) "-" getdate ();} Function TranyEarmonthtitle (Year, Month) {with (New Date (Year, Month-1)) Return "<span style = 'text-decoration: underline Cursor: Hand; Font-Weight: bold; padding: 1 2 0 1; Width: 40px; 'οnclick = showmore (1940, 2050, this.innerhtml) οnmοuseοver = / "</p> <p>This.RuntimeStyle.csstext = 'color: #fff;' / "οnmοuseοut = /" this.RuntimeStyle.csstext = '' / "onpropertychange = showc ()> getYear () " </ span> " " year " " <span style = 'text-decoration: underline; cursor: hand; font-weight: bold; padding: 1 2 0 1; Width: 20px;' οnclick = showmore (1, 12, this.innerhtml) οnmοuseοver = / "this.TimeStyle.csstext='color:#fff;'/ "οnmοuseοut = /" this.RuntimeStyle.csstext = '/ "onpropertychange = showc ()> (getMonth () 1) </ Span> " " Month ";} Function Showc () {if (Event.PropertyName! =" InnerHtml ") Return; Window.Thecalendar.Year = New Number (Document.all.TitleyEar.GtelementsBytagname (" span ") [0" ] .innerHTML); window.theCalendar.month = new Number (document.all.titleYear.getElementsByTagName ( "span") [1] .innerHTML); window.document.all.calendarBox.innerHTML = makeCalendarHtmlStr (window.theCalendar.year , window.theCalendar.month); window.document.all.calendarBox.show = show; window.document.all.calendarBox.show ();} function showMore (starNum, endNum, selectedValue) {var obj = window.event. SRC ELEMENT; VAR SELECTEDINDEX = SELECTEDVALUE - STARNUM;</p> <p>if (obj.selectBox) {obj.selectBox.selectedIndex = selectedIndex; return obj.selectBox.show (document.all.calendarBox.offsetHeight document.all.weekNameBox.offsetHeight);} var selectBox = window.document.createElement ( " div "); selectBox.className =" selectBox "; selectBox.style.height = 0; selectBox.style.top = window.event.clientY - window.event.offsetY window.event.srcElement.offsetHeight; selectBox.style. left = window.event.clientX - window.event.offsetX; selectBox.show = showBox; selectBox.selectedIndex = selectedIndex; selectBox.onclick = function () {var selectedObj = window.event.srcElement; if ( "nobr" == selectedObj.tagName.toLowerCase () && selectBox.contains (selectedObj)) {if (obj.innerHTML = selectedObj.innerHTML) obj.innerHTML = selectedObj.innerHTML;!}} selectBox.onlosecapture = alert var iString = ""; for ( VAR i = starnum; i <= endnum; i ) {istring = "<nobr οnmοuseοver = /" this.parentnode.getElementsBytagname ('nobr') [this.parentnode.selected ".style.csstext = '; th Is.style.csstext = 'background-color: # 00006c; color: #fff;' / "οnmοuseοut = this.style.csstext = ''>" i "</ nobr> <br>"} SelectBox.insertAdjacenthtml "afterBegin", iString); window.document.body.appendChild (selectBox); obj.selectBox = selectBox; obj.selectBox.show (document.all.calendarBox.offsetHeight document.all.weekNameBox.offsetHeight);}</p> <p>Function showbox (Iheight) {var box = this; box.style.height = 1; box.style.display = "block"; window.clearinterval (Box.TimeHandle); box.timehandle = window.setInterval (Intervalhandle, 1) , VAR S = 0, T = 1; function intervalHandle () {Box.ScrollTop = 1000000; s = S T * T; t = 0.5; Box.Style.Height = PARSEINT (Box.Style.Height) Math .floor (s); box.style.width = 65 / iHeight * box.offsetHeight; if (box.offsetHeight> iHeight) {window.clearInterval (box.timeHandle); box.style.height = iHeight; box.scrollTop = box.childNodes [0] .offsetHeight * box.selectedIndex; box.getElementsByTagName ( "nobr") [box.selectedIndex] .style.cssText = 'background-color: # 00006C; color: #fff;'; window.document. Attachevent ("OnClick", Box.hide = function () {box.style.display = "none"; Window.Document.detachevent ("OnClick", Box.hide)};</p> <p>}}}</p> <p></ script></p> <p><script></p> <p>Function buttonOver () {var obj = window.event.srcelement; if (obj.tagname.tolowercase () == "span" && obj.classname.replace (/ controlbutton / ig, "star") == "star") {Obj.RuntimeStyle.csstext = "Border-color: #fff # 606060 # 808080 #fff; padding: 3 0 0 0";} if (obj.tagname.tolowercase () == "span" && obj.parentNode.classname .replace (/ ctable / ig, "star") == "star") {Obj.style.backgroundColor = "#fff";}} function buttonout () {var obj = window.event.srcelement; if (Obj. TAGNAME.TOLOWERCASE () == "span" && obj.classname.replace (/ controlbutton / ig, "star") == "star") {obj.RuntimeStyle.csstext = "";} if (obj.tagname.tolowercase () == "span" && obj.parentnode.classname.replace (/ ctable / ig, "star") == "star") {window.SetTimeout (function () {obj.style.backgroundcolor = "" , 300);}} function button () {var obj = window.event.srcelement; if (obj.tagname.tolowercase () == "span" && obj.classname.replace (/ controlbutton / ig, "star") == "star") {obj.setcapture (); obj.RuntimeStyle.BorderColor = "# 808080 #Fefefe #Fefefe # 808080 ";}} function buttonup () {var obj = window.event.srcelement; if (obj.tagname.tolowercase () ==" span "&& obj.classname.replace (/ ControlButton / IG, "star") == "star") {obj.releasecapture (); obj.RuntimeStyle.csstext = "";}} function docmd ()}} function DOCMD ()}} function DOCMD ()}};}; if (Obj.tagname.tolowercase) ) == "span" &&</p> <p>Obj.classname.Replace (/ controlbutton / ig, "star") == "star") {switch (obj.getattribute ("cmd")) {case "py": window.document.all.titleyear.innerhtml = Window .TranYearMonthTitle (window.theCalendar.year-1, window.theCalendar.month); window.document.all.calendarBox.innerHTML = makeCalendarHtmlStr (window.theCalendar.year-1, window.theCalendar.month); break; case "pm ": window.document.all.titleYear.innerHTML = window.TranYearMonthTitle (window.theCalendar.year, window.theCalendar.month-1); window.document.all.calendarBox.innerHTML = makeCalendarHtmlStr (window.theCalendar.year, window .Thecalendar.month-1); Break; Case "NM": window.document.all.titleyear.innerhtml = window.TranyEARMONTHTILE (Window.Thecalendar.Year, Window.Thecalendar.month 1); window.document.all. calendarBox.innerHTML = makeCalendarHtmlStr (window.theCalendar.year, window.theCalendar.month 1); break; case "ny": window.document.all.titleYear.innerHTML = window.TranYearMonthTitle (window.theCalen dar.year 1, window.theCalendar.month); window.document.all.calendarBox.innerHTML = makeCalendarHtmlStr (window.theCalendar.year 1, window.theCalendar.month); break;} window.document.all.calendarBox .show (); window.currentSelectDate = starCaTran (nyear, nmonth, ndate); window.currentActiveItem = window.document.getElementById (currentSelectDate); if (window.currentActiveItem) window.currentActiveItem.runtimeStyle.cssText = "background: url ( Choiceit.gif) No-repeat 12px 6px; color: # 000; padding-top: 1px; font-weight: bold ";}}</p> <p>Function show () {var box = this; window.cleartimeout; var cdateboxs = this.getlementsBytagname ("span"); for (var i = 0; i <cdateboxs.length; i ) {cdateboxs [i ] .defaultValue = new number (cdateBoxs [i] .innerhtml); cdateboxs [i] .innerhtml = 0;} showdate (); function showdate () {for (var i = 0; i <cdateboxs.length; i ) { IF (cdateboxs [i] .innerhtml) 1 <= new number (cdateboxs [i] .defaultValue) cdateboxs [i] .innerhtml = new number (cdateboxs [i] .innerhtml) 1} box.timeHandle = Window.SetTimeout (Showdate, 1);} this.show = show1}</p> <p>Function show1 () {var box = this; window.cleartimeout; var cdateboxs = this.getlementsBytagname ("span"); for (var i = 0; i <cdateboxs.length; i ) cdateboxs [i] .style.display = "none"; showdate (cdateboxs [0]);</p> <p>Function showdate (obj) {if (! Obj) return; obj.style.display = "inline"; box.timehandle = window.settimeout (bunction () {showdate (obj.nextsibling);}, 1);} this. SHOW = show}</p> <p>/ * Function show () {} * / </ script> <style> * {font: 12px; letter-spacing: 0px;} body {background-color: # e5e9f2; overflow: hidden; margin: 0; border: 0px } # titleyear {text-align: center; padding-top: 3px; width: 120px; height: 20px; border: solid # e5e9f2; border-width: 0px 1px 1px 0px; Background-Color: # a4b9d7; color: # 000; cursor: default;} # weeknamebox {width: 282px; border-bottom: 0;}. Weekname {text-align: center; padding-top: 4px; width: 40px; height: 20px; border: Solid # E5E9F2; Border-width: 0px 1px 1px 0px; Background-Color: # c0d0e8; color: # 243f65; cursor: default;}. controlbutton {font-family: WebDings; font: 9px; text-align: center; padding-top: 2px Width: 40px; Border: Solid # e5e9f2; border-width: 0px 1px 1px 0px; Background-Color: # a4b9d7; color: # 243f65; cstract; default;}. Ctable {width: 282px; margin Bottom: 20px;}. ctable span {font: 9px verdana; font-weight: bold; color: # 243f65; text-align: center; padding-top: 4px; width: 40px; height: 26px; border: Solid # c0d0e8 Border-width: 0px 1px 1px 0px; Cursor: Default }. Cdate {background-color: # e5e9f2;}. Ctable span.othermontdate {color: # 999; background-color: # f6f6f6;}</p> <p>.SelectBox {Cursor: Hand; Font: 9px Verdana; Width: 80px; Position: absolute; border: 1px solid # 425E87; overflow-y: scroll; overflow-: hidden; background-color: #fff; Filter: progID: DXImageTransform.Microsoft.Shadow (Color = # 999999, offX = 10, offY = 10, direction = 120, Strength = 5); SCROLLBAR-FACE-COLOR: # E5E9F2; SCROLLBAR-HIGHLIGHT-COLOR: # E5E9F2; SCROLLBAR-sHADOW- COLOR: # A4B9D7; SCROLLBAR-3DLIGHT-COLOR: # A4B9D7; SCROLLBAR-ARROW-COLOR: # 000000; SCROLLBAR-TRACK-COLOR: # eeeee6; SCROLLBAR-dARKSHADOW-COLOR: #ffffff;} selectBox nobr {padding: 0px 0px. 2px 5px; width: 100%; color: # 000; letter-spacing: 2px; text-decoration: none;} </ style> <body overselectstart = "Return False"> <div style = "margin: 0 0 0 0 "> <div id = controlbar> <span class = controlbutton cmd = py title = last year> 33 </ span> <span class = controlbutton cmd = PM Title = last January> 3 </ span> <span id = Titleyear> </ span> <span class = controlbutton cmd = nm title = next Jan> 4 </ span> <span class = controlbutton cmd = ny title = Next year> 44 </ span> </ div> <div> <div> <div> <div> <div> <div> <DIV ID = WeekNameBox> </ div> <div id = calendarbox> </ div> </ div > </ body></p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-122771.html</div><div class="plugin d-flex justify-content-center mt-3"></div><hr><div class="row"><div class="col-lg-12 text-muted mt-2"><i class="icon-tags mr-2"></i><span class="badge border border-secondary mr-2"><h2 class="h6 mb-0 small"><a class="text-secondary" href="tag-2.html">9cbs</a></h2></span></div></div></div></div><div class="card card-postlist border-white shadow"><div class="card-body"><div class="card-title"><div class="d-flex justify-content-between"><div><b>New Post</b>(<span class="posts">0</span>) </div><div></div></div></div><ul class="postlist list-unstyled"> </ul></div></div><div class="d-none threadlist"><input type="checkbox" name="modtid" value="122771" checked /></div></div></div></div></div><footer class="text-muted small bg-dark py-4 mt-3" id="footer"><div class="container"><div class="row"><div class="col">CopyRight © 2020 All Rights Reserved </div><div class="col text-right">Processed: <b>0.038</b>, SQL: <b>9</b></div></div></div></footer><script src="./lang/en-us/lang.js?2.2.0"></script><script src="view/js/jquery.min.js?2.2.0"></script><script src="view/js/popper.min.js?2.2.0"></script><script src="view/js/bootstrap.min.js?2.2.0"></script><script src="view/js/xiuno.js?2.2.0"></script><script src="view/js/bootstrap-plugin.js?2.2.0"></script><script src="view/js/async.min.js?2.2.0"></script><script src="view/js/form.js?2.2.0"></script><script> var debug = DEBUG = 0; var url_rewrite_on = 1; var url_path = './'; var forumarr = {"1":"Tech"}; var fid = 1; var uid = 0; var gid = 0; xn.options.water_image_url = 'view/img/water-small.png'; </script><script src="view/js/wellcms.js?2.2.0"></script><a class="scroll-to-top rounded" href="javascript:void(0);"><i class="icon-angle-up"></i></a><a class="scroll-to-bottom rounded" href="javascript:void(0);" style="display: inline;"><i class="icon-angle-down"></i></a></body></html><script> var forum_url = 'list-1.html'; var safe_token = 'ThgOtqY8jSidWgibR19DiLn33kmOL4YxxbawGp_2BcUuc0aPOXN_2F3avqGVZNM_2BgDR5TLg1_2FTrLp_2FMlQdWbFQbkuw_3D_3D'; var body = $('body'); body.on('submit', '#form', function() { var jthis = $(this); var jsubmit = jthis.find('#submit'); jthis.reset(); jsubmit.button('loading'); var postdata = jthis.serializeObject(); $.xpost(jthis.attr('action'), postdata, function(code, message) { if(code == 0) { location.reload(); } else { $.alert(message); jsubmit.button('reset'); } }); return false; }); function resize_image() { var jmessagelist = $('div.message'); var first_width = jmessagelist.width(); jmessagelist.each(function() { var jdiv = $(this); var maxwidth = jdiv.attr('isfirst') ? first_width : jdiv.width(); var jmessage_width = Math.min(jdiv.width(), maxwidth); jdiv.find('img, embed, iframe, video').each(function() { var jimg = $(this); var img_width = this.org_width; var img_height = this.org_height; if(!img_width) { var img_width = jimg.attr('width'); var img_height = jimg.attr('height'); this.org_width = img_width; this.org_height = img_height; } if(img_width > jmessage_width) { if(this.tagName == 'IMG') { jimg.width(jmessage_width); jimg.css('height', 'auto'); jimg.css('cursor', 'pointer'); jimg.on('click', function() { }); } else { jimg.width(jmessage_width); var height = (img_height / img_width) * jimg.width(); jimg.height(height); } } }); }); } function resize_table() { $('div.message').each(function() { var jdiv = $(this); jdiv.find('table').addClass('table').wrap('<div class="table-responsive"></div>'); }); } $(function() { resize_image(); resize_table(); $(window).on('resize', resize_image); }); var jmessage = $('#message'); jmessage.on('focus', function() {if(jmessage.t) { clearTimeout(jmessage.t); jmessage.t = null; } jmessage.css('height', '6rem'); }); jmessage.on('blur', function() {jmessage.t = setTimeout(function() { jmessage.css('height', '2.5rem');}, 1000); }); $('#nav li[data-active="fid-1"]').addClass('active'); </script>