Select date js

xiaoxiao2021-03-06  90

//date.asp

Date </ title> <! - # include file = js.asp -> </ HEAD></p> <p><body></p> <p><Input Name = "GCRQ" TYPE = "text" id = "GCRQ" value = "<% =" "onfocus =" creteMonthview (this) "Onblur =" deleteMonthView (this) "></p> <p></ body></p> <p></ html> ************************************************************** *********** // js.asp <script language = "javascript"></p> <p><! -</p> <p>// this is jsmonthview 1.0, author is Chinese dengkang (2002-07-12).</p> <p>// i Allow Your Do Any Modify, But I don't Bear Any Liability.</p> <p>// Browser: IE 4 and Later</p> <p>Function DefineMonthview (THETEXTOBJECT) {// The Month View Construct Function</p> <p>THIS.GETONLYNAME = Function () {// create one and only name on the document</p> <p>Var thename = "mv"; // prefix</p> <p>Var aryname = new array ();</p> <p>AryName [0] = "_MONTHVIEW"; // The Month View Main Body's Name Postfix</p> <p>AryName [1] = "_monthgrid"; // The Month View Day Area's Name Postfix</p> <p>AryName [2] = "_GOPReviousMonth"; // The Month View Go Previous Month Button's Name Postfix</p> <p>AryName [3] = "_gonextmonth"; // The Month View Go Next Month Button's Name Postfix</p> <p>AryName [4] = "_yearlist"; // The Month View Year List's Name Postfix</p> <p>AryName [5] = "_monthlist"; // The Month View Month List's Name Postfix</p> <p>AryName [6] = "_daylist"; // Keep The Month View Current Day's Element Name Postfix</p> <p>VAR i = -1, j = 0, MAXI = 2000;</p> <p>VAR EXTAG = True;</p> <p>While ((Extag == True) && (i <maxi)) {i ;</p> <p>EXTAG = false;</p> <p>For (j = 0; j <aryname.length; j ) {</p> <p>IF (Document.all.Item (Thename i.tostring () AryName [J])! = null) {</p> <p>EXTAG = True;</p> <p>}</p> <p>}</p> <p>}</p> <p>IF (extag == false) {</p> <p>Return (Thename I.TOString ());</p> <p>} else {</p> <p>Return ("_" thename);</p> <p>}</p> <p>}</p> <p>Var thename = this.getonlyName ();</p> <p>THIS.NAME = Thename; // the Month View Name</p> <p>this.Source = ThetObject; // The Month View Act on ThetextObject</p> <p>THIS.MINYEAR = 1970; // Year List min Value</p> <p>// return betWeen 1000 and 9999 and <= this.maxyear</p> <p>this.maxyear = 2030; // Year List Max Value</p> <p>// Return Between 1000 and 9999 and> = this.minyear</p> <p>THIS.WIDTH = 200; // The Month View Main Body's Width</p> <p>this.height = 120; // The Month View Main Body's Height</p> <p>this.dateformat = "<yyyy> - <mm> - <dd>"; // the date format</p> <p>// <yy> or <yyyy> is Digital Format Month, <mmm> or <mmmmm> is character format month, <d> or <dd> is day, other char unchanged</p> <p>// this function setting year, Month and day sequence</p> <p>// EXAMPLE:</p> <p>// <yyyy> - <mm> - <dd>: 2002-04-01</p> <p>// <yy>. <m>. <d>: 02.4.1</p> <p>// <yyyy> year <mmmmmm> Month <d> day: 2002 year april month 1 day</p> <p>// <m> / <d> / <yy>: 4/1/02</p> <p>// <mmm> <dd>, <yyyy>: APR 01, 2002</p> <p>// <mmmmmm> <d>, <yyyy>: April 1, 2002</p> <p>// <dd> <mmm> <yyyy>: 01 APR 2002</p> <p>// <dd> / <mm> / <yyyy>: 01/04/2002</p> <p>THIS.unselectBGColor = "#ffffff"; // the Month View Default Background Colorthis.SelectedBGColor = "# 808080"; // the successd date background color</p> <p>this.selectedColor = "#fffffff"; // The successd Date Front Color</p> <p>this.daybdwidth = "1"; // the day unit border width, Unit is PX</p> <p>This.daybdcolor = this.unselectbgcolor; // the day unit border color, default is this.unselectbgcolor</p> <p>this.todayBdcolor = "# ff0000"; // Denote Today's Date Border Color</p> <p>THIS.INVALIDCOLOR = "# 808080"; // IT IS Not Current Month Day Front Color</p> <p>THIS.VALIDCOLOR = "# 0000ff"; // IT IS CURRENT MONTH DAY Front Color</p> <p>THIS.WEEKENDBGCOLOR = this.unselectbgcolor; // the weekend background color, default is this.unselectbgcolor</p> <p>THIS.WEEKENDCOLOR = this.validcolor; // the weekend front color, default is this.validcolor</p> <p>THIS.YearListStyle = "font-size: 12px; font-family: Song;"; // the year list's style</p> <p>THIS.MONTHLISTSTYLE = "font-size: 12px; font-family: Song;"; // the Month List's Style</p> <p>THIS.MONTHNAME = New Array (); // Month Name List, Font Is Include this.montlistStyle</p> <p>THIS.MONTHNAME [0] = "Jan";</p> <p>THIS.MONTHNAME [1] = "February";</p> <p>THIS.MONTHNAME [2] = "March";</p> <p>THIS.MONTHNAME [3] = "April";</p> <p>THIS.MONTHNAME [4] = "May";</p> <p>THIS.MONTHNAME [5] = "June";</p> <p>THIS.MONTHNAME [6] = "July";</p> <p>THIS.MONTHNAME [7] = "August";</p> <p>THIS.MONTHNAME [8] = "September";</p> <p>THIS.MONTHNAME [9] = "October";</p> <p>THIS.MONTHNAME [10] = "November";</p> <p>THIS.MONTHNAME [11] = "December";</p> <p>THIS.TITLESTYLE = "Cursor: default; color: # 000000; Background-Color:" this.unselectbgcolor "; font-size: 16px; font-usight: bolder; font-family: Times new Roman; Text-Align: Center; vertical-align: bottom; "; // the month view title = new array (); // week name list, font is incrude this.titleStyle</p> <p>THIS.WEEKNAME [0] = "Japan";</p> <p>This.Weekname [1] = "one";</p> <p>THIS.WEEKNAME [2] = "two";</p> <p>THIS.WEEKNAME [3] = "Three";</p> <p>THIS.WEEKNAME [4] = "four";</p> <p>THIS.WEEKNAME [5] = "5";</p> <p>THIS.WEEKNAME [6] = "six";</p> <p>This.footerstyle = "CURSOR: HAND; color: # 000000; Background-Color:" this.unselectbgcolor "; font-size: 12px; font-family: verdana; text-align: left; vertical-align: middle; "// The Month Footer Area's Style</p> <p>THIS.TODAYTITLE = "Today:"; // Today Tip String, Font Is Include this.footerstyle</p> <p>THIS.MONTHBTSTYLE = "font-family: marlett; font-size: 12px;"; // the change MONTH Button Style</p> <p>This.PreviousMonthtext = "3"; // The Go Previous Month Button Text</p> <p>// font is include this.monthbtstyle</p> <p>this.nextMonthtext = "4"; // the Go Next Month Button Text</p> <p>// font is include this.monthbtstyle</p> <p>This.MonthgridStyle = "Border-width: 1px; border-style: solId; border-color: # 000000;"; // the Month View Main Body's Default Style</p> <p>THISHEADERSTYLE = "Height: 32px; Background-Color: Menu;" // The Month View Header Area's Style</p> <p>this.LineBgStyle = "height: 10px; background-color:" this.UnselectBgColor "; text-align: center; vertical-align: middle;"; // the month view title area and day area compart area background stylethis. LINESTYLE = "Width: 90%; Height: 1PX; Background-Color: # 000000;"; // The Month View Title Area And Day Area Compart Area Front Style</p> <p>This.dayStyle = "Cursor: hand; font-size: 12px; font-family: verdana; text-align: center; vertical-align: middle;" // the Month View Day Area's Style</p> <p>THIS.OVERDAYSTYLE = "this.style.textDecoration = 'underline';"; // the mouse over a day style</p> <p>THIS.OutdayStyle = "this.style.textDecoration = 'none';"; // the mouse Out a day style</p> <p>THIS.GETOFFSETLEFT = Function (THEOBJECT) {// Return Theobject's Absolute OffsetLeft</p> <p>VAR ABSLEFT = 0;</p> <p>Var theposition = "";</p> <p>VAR tmpObject = theobject;</p> <p>While (tmpObject! = null) {</p> <p>TmpOsis = tmpObject.position;</p> <p>TmpObject.position = "static";</p> <p>Absleft = tmpObject.offsetleft;</p> <p>TmpObject.position = theposition;</p> <p>TmpObject = TmpObject.offSetParent;</p> <p>}</p> <p>Return AbsLeft;</p> <p>}</p> <p>THIS.GETOFFSETTOP = Function (theObject) {// Return theobj's Absolute Offsettop</p> <p>VAR abstop = 0;</p> <p>Var theposition = "";</p> <p>VAR tmpObject = theobject;</p> <p>While (tmpObject! = null) {</p> <p>TmpOsis = tmpObject.position;</p> <p>TmpObject.position = "static";</p> <p>Abstop = TmpObject.offSettop;</p> <p>TmpObject.position = theposition;</p> <p>TmpObject = TmpObject.offSetParent;</p> <p>}</p> <p>Return ABSTOP;</p> <p>}</p> <p>THIS.GETFORMATYEAR = function (theyear) {// Format theyear to 4 digit</p> <p>Var tmpyear =.</p> <p>IF (TMPYEAR <100) {</p> <p>TMPYEAR = 1900;</p> <p>IF (TMPYEAR <1970) {</p> <p>TMPYEAR = 100;</p> <p>}</p> <p>}</p> <p>IF (TMPYEAR <this.minyear) {</p> <p>TMPYEAR = this.minyear;</p> <p>}</p> <p>IF (TMPYEAR> this.maxyear) {</p> <p>TMPYEAR = this.maxyear;</p> <p>}</p> <p>Return (TMPYEAR);</p> <p>}</p> <p>THIS.GETMONTHDAYS = Function (theyear, themonth) {// Get theyear and themonth days Number</p> <p>Var thedays = new Array (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);</p> <p>Var themonthday = 0, tmpyear = this.getformatyear (theyear);</p> <p>THEMONTHDAY = these Days [themonth];</p> <p>IF (THEMONTH == 1) {// Themonth is February</p> <p>IF ((tmpyear% 4 == 0) && (tmpyear% 100! = 0)) || (TMPYEAR% 400 == 0) {</p> <p>THEMONTHDAY ;</p> <p>}</p> <p>}</p> <p>Return (themonthday);</p> <p>}</p> <p>This.SetdateFormat = function (theyear, themonth, theday) {// Format a date to this.dateFormat</p> <p>Var thedate = this.dateFormat;</p> <p>Var tmpyear = this.getformatyear (theYear);</p> <p>VAR TMPMONTH = THEMONTH;</p> <p>IF (tmpmonth <0) {</p> <p>TMPMONTH = 0;</p> <p>}</p> <p>IF (tmpmonth> 11) {</p> <p>TMPMONTH = 11;</p> <p>}</p> <p>VAR TMPDAY = these;</p> <p>IF (TMPDAY <1) {</p> <p>TMPDAY = 1;</p> <p>} else {</p> <p>TMPDAY = this.getMontHDAYS (TMPYEAR, TMPMONTH);</p> <p>IF (THEDAY <TMPDAY) {</p> <p>TMPDAY = these Download;</p> <p>}</p> <p>}</p> <p>THEDATE = thesedate.replace (/ <yyyy> / g, tmpyear.tostring ());</p> <p>THEDATE = thisdate.replace (/ <yy> / g, tmpyear.tostring (). Substr (2, 2));</p> <p>THEDATE = thesedate.replace (/ <mmmmmm> / g, this.monthname [tmpmonth]);</p> <p>THEDATE = thisdate.replace (/ <mmm> / g, this.monthname [tmpmonth] .substr (0, 3));</p> <p>IF (Themonth <9) {</p> <p>THEDATE = thesedate.replace (/ <mm> / g, "0" (TMPMONTH 1) .tostring ());</p> <p>} else {</p> <p>THEDATE = thesedate.replace (/ <mm> / g, (Tmpmonth 1) .tostring ());</p> <p>}</p> <p>THEDATE = thesedate.replace (/ <m> / g, (Tmpmonth 1) .tostring ()); if (theDay <10) {</p> <p>THEDATE = thisdate.replace (/ <dd> / g, "0" tmpday.tostring ());</p> <p>} else {</p> <p>THEDATE = thisdate.replace (/ <dd> / g, tmpday.tostring ());</p> <p>}</p> <p>THEDATE = thisdate.replace (/ <d> / g, tmpday.tostring ());</p> <p>Return (thisDate);</p> <p>} this.gettextdate = function (thistring) {// convert a String to a date, if the string is not a date, returnon a Empty string var i = 0, tmpcha = "", find_tag ​​= ""; var start_at = 0 , end_at = 0, month_at = 0, day_at = 0; var TMP_AT = 0, one_at = 0, two_at = 0, one_days = 0, two_days = 0; var arydate = new array (); var tmpyear = - 1, TMPMONTH = -1, tmpday = -1; var tmpdate = thesestring.tolowercase (); var defdate = ""; end_at = tmpdate.length; for (i = 1; i <end_at; i ) {if (tmpdate. Charat (i) == "0") {TMPCHAR = TmpDate.Charat (i-1); if (TmpChar <"0" || tmpcha> "9") {tmpdate = tmpdate.substr (0, i-1) "-" TMPDATE.SUBSTR (i 1);}}}}}}} for (i = 0; i <9; i ) {tmpdate = tmpdate.replace (this.Monthname [i] .tolowercase (). Substr (0 , 3), "-00" (i 1) .tostring () "-");} for (i = 9; i <12; i ) {tmpdate = tmpdate.replace (this.Monthname [i] .tolowercase (). Substr (0,3), "-0" (i 1) .tostring () "-");} Tmpdate = tmpdate.replace (/ jan / g, "-001-") TMPDATE = TMPDATE.REPLACE (/ Feb / g, "-002-"); TMPDATE = TMPDATE.REPLA CE (/ Mar / G, "-003-"); tmpdate = tmpdate.replace (/ APR / g, "-004-"); TMPDATE = TMPDATE.REPLACE (/ May / g, "-005-"); Tmpdate = tmpdate.replace (/ jun / g, "-006-"); tmpdate = tmpdate.replace (/ jul / g, "-007-"); tmpdate = tmpdate.replace (/ aug / g, "-008 - "); tmpdate = tmpdate.replace (/ SEP / G," -009- "); tmpdate = tmpdate.replace (/ OCT / G," -010- "); tmpdate =</p> <p>TMPDATE.REPLACE (/ NOV / G, "-011-"); tmpdate = tmpdate.replace (/ dec / g, "-012-"); for (i = 0; i <tmpdate.length; i ) {TMPCHAR = TMPDATE.CHARAT (I); IF ((TmpChar <"0" || TmpChar> "9") && (tmpcha! = ")) {tmpdate = tmpdate.replace (tmpchar," - ")}} while (Tmpdate.indexof ("-")! = -1) {tmpdate = tmpdate.replace (/ - / g, "-");} start_at = 0; end_at = tmpdate.length-1; while (tmpdate). Charat (start_AT) == "-") {start_at ;} while (tmpdate.charat (end_at) == "-") {end_at--;} if (start_at <end_at 1) {tmpdate = tmpdate.substring (Start_at) , END_AT 1);} else {tmpdate = ""} arydate = tmpdate.split ("-"); if (arydate.length! = 3) {return (defdate);} for (i = 0; i < 3; i ) {IF (arydate [i], 10) <1) {arydate [i] = "1";}} find_tag ​​= "}} find_tag ​​="}}} find_tag ​​= "}); for (i = 2; I> = 0; I- -) {IF (Arydate [i] .length == 3) {if (Arydate [i]> = "001" && arydate [i] <= "012") {TMPMONTH = PARSEINT (Arydate [i], 10) -1; Switch (i) {case 0: Find_tag ​​= "100"; one_at = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 1: Find_TAG = "010 "One_at = PARSE Int (Arydate [0], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 2: Find_TAG = "001"; One_at = PARSEINT (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); Break;}}}}} {One_tag! = "000") {One_Days = this.getMontHDAYS (Two_AT, TMPMONTH); Two_Days = this.getMontHDAYS (One_AT, TMPMONTH); IF ((One_at> One_days) && (two_at> two_days) {return (defdate);</p> <p>} {TMPYEAR = this.getformatyear (TWO_AT); tmpday = one_at;}} (one_at> one_days) && (TWO_AT <= two_days)) {TMPYEAR = THIS .GetFormatYear (one_at); tmpDay = two_at;} if ((one_at <= one_days) && (two_at <= two_days)) {tmpYear = this.GetFormatYear (one_at); tmpDay = two_at; tmpDate = this.DateFormat; year_at = tmpDate .indexof ("<yyyy>"); if (Year_AT == -1) {year_at = tmpdate.indexof ("<yy>");} day_at = tmpdate.indexof ("<dd>"); if (DAY_AT = = -1) {day_at = tmpdate.indexof ("<d>");} if (year_at> = day_at) {tmpyear = this.getformatyear (TWO_AT); tmpday = one_at;}}}}} Return (New Date (TmPyear, TMPMONTH , TMPDAY));} Find_tag ​​= "000"; for (i = 2; I> = 0; I -) {ix (Parseint (Arydate [i], 10)> 31) {TMPYEAR = this.GetFormatyear (PARSEINT (Arydate [I], 10)); Switch (i) {case 0: Find_TAG = "100"; one_at = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 1: Find_tag ​​= "010"; One_at = PARSEINT (Arydate [0], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case 2: Find_TAG = "001"; one_at = parseint (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); Break;}}} f (Find_TAG == "000") {TMPDATE = this.dateFormat; Year_at = tmpdate.indexof ("<yyyy>"); if (Year_AT == -1) {year_at = tmpdate.indexof ("<yy>");} Month_at = tmpdate.indexof ("<mmmmmm>"); if (MONTH_AT == -1) {month_at = tmpdate.indexof ("<mmm>");} if (Month_at ==</p> <p>-1) {month_at = tmpdate.indexof ("<mm>");} if (Month_AT == -1) {MONTH_AT = TmpDate.indexOf ("<m>");} day_at = tmpdate.indexof ("<DD > "); if (day_at == -1) {day_at = tmpdate.indexof (" <d> ");} IF (Year_AT> MONTH_AT) && (YEAR_AT> DAY_AT) {FIND_TAG =" 001 "} IF (Year_AT> MONTH_AT) && (Year_AT <= day_at)) {FIND_TAG = "010";} IF ((Year_AT <= MONTH_AT) && (Year_AT> Day_AT) {FIND_TAG = "010";} if ((Year_AT <= Month_at) && (Year_AT <= day_at) {FIND_TAG = "100";} Switch (Find_TAG) {CASE "100": tmpyear = parseint (Arydate [0], 10); One_at = PARSEINT (Arydate [1], 10 ); TWO_AT = PARSEINT (Arydate [2], 10); Break; Case "010": one_at = parseint (Arydate [0], 10); tmpyear = parseint (Arydate [1], 10); Two_at = PARSEINT (Arydate [2], 10); Break; Case "001": one_at = parseint (Arydate [0], 10); Two_at = PARSEINT (Arydate [1], 10); TMPYEAR = PARSEINT (Arydate [2], 10); Break;} tmpyear = this.getformatyear (TMPYEAR);} if (Find_tag! = "000") {if (one_at> 12) && (two_at> 12)) {return (defdate);} if (one_at <= 12 ) {IF (two_at> this.getMonthdays (TMPYEAR, One_AT-1 )) {RETURN (New Date (TMPYEAR, One_AT-1, this.getMontHDAYS (TMPYEAR, One_AT-1));} if (Two_AT> 12) {RETURN (New Date (TMPYEAR, One_AT-1, Two_AT); }}}} (TWO_AT <= 12) {if (One_AT> this.getmonthdays (TMPYEAR, TWO_AT-1)) {Return (New Date (TMPYEAR, TWO_AT-1, this.getmonthdays (TMPYEAR, TWO_AT-1)); } if (one_at> 12) {RETURN (New Date (TMPYEAR, TWO_AT-1, One_AT);}} = ((One_AT <= 12) && (TWO_AT <= 12)) {TMPMONTH =</p> <p>One_at-1; tmpday = two_at; tmpdate = this.dateFormat; month_at = tmpdate.indexof ("<mmmmmm>"); if (MONTH_AT == -1) {MONTH_AT = TmpDate.indexof ("<mmm>");} IF (MONTH_AT == -1) {month_at = tmpdate.indexof ("<mm>");} if (Month_AT == -1) {MONTH_AT = Tmpdate.indexOf ("<m>");} day_at = tmpdate. IndexOf ("<DD>"); if (DAY_AT == -1) {day_at = tmpdate.indexof ("<d>");} if (Month_AT> = day_at) {TMPMONTH = Two_at-1; tmpDay = one_at; } return (new Date (tmpYear, tmpMonth, tmpDay));}}} this.CreateYearList = function (minYear, maxYear) {// create year list var theName = this.Name; var theYearObject = document.all.item (theName "_Yearlist"); if (theyearObject == null) {return;} var theyear = 0; var theyearhtml = "<select id = /" thename "_yearlist /" style = / "" this.yearListStyle "/" TabINDEX = / "- 1 /" onchange = / "Document.jsmonthView.UpdateMonthgrid (this) /" onblur = / "Document.jsmonthView.deleteMonthgrid () /"> "; for (theyear = minyear; theyear <= Maxyear; theyear ) {"{ehtml =" <option value = / "" t Heyear.toString () "/"> " " </ option> ";} theyearhtml =" </ select> "; theyearObject.outerHtml = theyearhtml; }imthtml;} this.createMonthlist = function () {// Create Month List var. = this.name; var themonthobject = document.all.item (thename "_monthlist");</p> <p>IF (THEMONTHOBJECT == NULL) {Return;} var themth = 0; var themthhtml = "<select id = /" thename "_Monthlist /" style = / "" this.monthlistStyle "TabINDEX = / "-1 /" onChange = / "document.jsMonthView.UpdateMonthGrid (this) /" onBlur = / "document.jsMonthView.DeleteMonthGrid () /"> "; for (theMonth = 0; theMonth <12; theMonth ) {theMonthHTML = "<option value = /" " " / "/" this.monthname [themonth] "</ option>";} themonthhtml = "</ select>"; ThemonThobject.outerHTML = theMonthHTML;} this.setDayList = function (theYear, theMonth, theDay) {// set the month view show a date var theName = this.Name; var theDayObject = document.all.item (theName "_DayList"); if (theDayObject == null) {return;} theDayObject.value = theDay.toString (); var theFirstDay = new Date (theYear, theMonth, 1); var theCurrentDate = new Date (); var theWeek = theFirstDay.getDay (); IF (theweek == 0) {theweek = 7;} var aleftday = 0; if (theMonth == 0) {THELEFTDAY = 31;} else {THELEFTDAY = this.getmont hDays (theYear, theMonth - 1);} var theRightDay = this.GetMonthDays (theYear, theMonth); var theCurrentDay = theLeftDay - theWeek 1; var offsetMonth = -1; // the month is previous month var theColor = this.InvalidColor var thebgcolor = this.unselectbgcolor; var thebdcolor = thebgcolor; var weekid = 0 var dayid = 0; var theestle = "; var thedaytml =" <Table Width =</p> <p>/ "100% /" height = / "100% /" border = / "0 /" cellspacing = / "0 /" cellpadding = / "0 /"; itDayHTML = "<trise = /" " THIS.TITLESTYLE "/"> "; for (dayId = 0; dayid <7; dayid ) {THEDAYHTML =" <TD width = / "10% /"> this.Weekname [dayID] </ TD> ";} thedayhtml =" </ tr> "; itDayhtml =" <tr> "; itDayhtml =" <td colspan = / "7 /" style = / " this.LinebgStyle " / " > ";"; " THISLINESTYLE " / "cellspacing = /" 0 / "cellpadding = /" 0 / "cellpacing = /" 0 / "cellpacing = /" 0 / "Cellpadding = /" 0 / "Cellpadding = /" 0 / "0 /" <Tr> <TD> </ TD> </ TR> "; Thedayhtml =" </ Table> "; ThedayHTML =" </ TD> "; THDAYHTML =" </ TR> "; for (WeekID = 0; WeekId <6; Weekid ) {TwayTML = "<tr sty = /" " this.dayStyle " / ">"; for (dayId = 0; dayId <7; dayid ) {if ((Thecurrentday> theleftday ) && (WeekId <3)) {offsetMonth ; // the month is current month; theCurrentDay = 1;} if ((theCurrentDay> theRightDay) && (WeekId> 3)) {offsetMonth ; // the month is next month; theCurrentDay = 1;} switch (offsetmonth) {case -1: thecolor = this.invalid Color; Break; Case 1: Thecolor = this.invalidColor; Break; Case 0: IF ((DAYID == 0) || (DAYID == 6)) {TheColor =</p> <p>this.WeekendColor;} else {theColor = this.ValidColor;} break;} if ((DayId == 0) || (DayId == 6)) {theBgColor = this.WeekendBgColor;} else {theBgColor = this.UnselectBgColor; } theBdColor = this.DayBdColor; if ((theCurrentDay == theDay) && (offsetMonth == 0)) {theColor = this.SelectedColor; theBgColor = this.SelectedBgColor; theBdColor = theBgColor;} if ((theYear == theCurrentDate.getFullYear ()) && (theMonth == theCurrentDate.getMonth ()) && (theCurrentDay == theCurrentDate.getDate ()) && (offsetMonth == 0)) {theBdColor = this.TodayBdColor;} theStyle = "border:" this. Daybdwidth "PX Solid" THEBDCOLOR "; Color:" Thecolor "; Background-Color:" THEBGCOLOR ";"; THEDAYHTML = "<TD Style = /" theestyle "/" onMouseOver = / " this.overdaystyle " / "onmouseout = /" " this.outdayStyle " / "onMousedown = /" Document.jsmonthView.createMonthgrid (" THEYAR.TOSTRING () ", " (THEMONTH OFFSETMONTH ). Tostring () "," ") /"> "; itDayhtml = thecurrentday.tos Tring (); itDayhtml = "</ td>"; ThecurrentDay ; }hiptyhtml = "</ tr>";} theDayhtml = "<tr style = /" this.footerstyle "/" onMouseDown = / "Document.jsmonthview.createMonthgrid (" thecurrentdate.getfullyear (). Tostring () "," </p> <p>ThecurrentDate.getMonth (). TOSTRING () "," thecurrentdate.getdate (). TOSTRING () "); /"> "; t =" Border: " this.daybdwidth " PX Solid " this. TODAYBDCOLOR ";"; "; .TodayTitle " this.setdateformat (), ThecurrentDate.getMonth (), ThecurrentDate.getDate () " </ td> "; itDayhtml =" </ tr> "; THEDAYHTML =" </ table> "; var theMonthGrid = document.all.item (theName " _MonthGrid "); theMonthGrid.innerHTML = theDayHTML;} this.CreateMonthGrid = function (theYear, theMonth, theDay) {// refresh the month view to the date, main action is run this.setDayList () and set this.Source.value var theTextObject = this.Source; if (theTextObject == null) {return;} var theName = this.Name; var theYearObject = document.all. Item (Thename "_yearlist"); var themonthobject = document.all.item (thename "_Monthlist"); var tmpyear = theyear; var tmpmonth = themonth; var TMPDA Y = 1; IF (TmpMonth <0) {TMPYEAR - TMPMONTH = 11;} if (TmpMonth> 11) {TMPYEAR ; tmpmonth = 0;}}} (tmpyear <this.minyear) {tmpyear = this.minyear;} IF (TMPYear> this.maxyear) {TMPYEAR = this.maxyear;}} {tmpday = 1;} else {tmpday = this.getMontHDAYS (TMPYEAR, TMPMONTH); IF (TMPDAY) {TmpDay = THEDAY;</p> <p>}} TheYearObject.value = tmpYear; theMonthObject.value = tmpMonth; this.setDayList (tmpYear, tmpMonth, tmpDay); theTextObject.value = this.SetDateFormat (tmpYear, tmpMonth, tmpDay); theTextObject.select ();} this.UpdateMonthGrid = function (theObject) {// run this.CreateMonthGrid () by theObject var theTextObject = this.Source; if (theTextObject == null) {return;} var theName = this.Name; var theYearObject = document.all.item ( theName "_YearList"); var theMonthObject = document.all.item (theName "_MonthList"); var theDayObject = document.all.item (theName "_DayList"); var tmpName = theObject.id.substr (theObject. id.lastIndexOf ( "_")); switch (tmpName) {case "_goPreviousMonth": // go previous month button theObject.disabled = true; this.CreateMonthGrid (parseInt (theYearObject.value, 10), parseInt (theMonthObject.value , 10) - 1, PARSEINT (THEDAYObject.value, 10)); theObject.disabled = false; break; case "_gonextmonth": // Go Next Month Button theobject.disabled = true; this.createMonthgrid (PARS eInt (theYearObject.value, 10), parseInt (theMonthObject.value, 10) 1, parseInt (theDayObject.value, 10)); theObject.disabled = false; break; case "_YearList": // year list this.CreateMonthGrid (parseInt (theYearObject.value, 10), parseInt (theMonthObject.value, 10), parseInt (theDayObject.value, 10)); break; case "_MonthList": // month list this.CreateMonthGrid (parseInt (theYearObject.value, 10), PARSEINT (THEMONTHOBJECT.VALUE, 10), PARSEINT (THEDAYObject.Value, 10)); Break; default: return;}} this.deleteMonthgrid =</p> <p>function () {// check document focus, if blur this.Source then delete this var theName = this.Name; var theDivObject = document.all.item (theName "_MonthView"); if (theDivObject == null) {return } var TmpObject = document.activeElement; while (tmpObject! = null) {if (tmpObject == this.source) {return;} // if (tmpObject.id == thename "_MONTHVIEW") {// Return; //} // if (tmpObject.id == Thename "_MONTHGRID") {// Return; //} if (tmpObject.id == Thename "_GOPREVIOUSMONTH") {return;} if (tmpObject.id == Thename "_gonextMonth") {return;} if (tmpObject.id == thename "_yearlist") {return;}} (tmpObject.id == thename "_MONTHLIST") {Return;} if (tmpObject.id = = theName "_DayList") {return;} tmpObject = tmpObject.parentElement;} if (tmpObject == null) {// delete the month view theDivObject.outerHTML = ""; var theDate = new Date (this.GetTextDate (this . Source.Value); IF (ISDATE) {this.source.value = "";} else {this.source.value = this.setdateFormat (these.GetFullyEar (), THEDATE.GETMONTH (), THEDATE.GETDATE ();} this.Source = null;}} this.initialMonthview = function () {var thename = this.name; var thevalue = this.name; var thevalue = this.Name; var thecurrentdate = new Date (this.getTextDate (ISNANTDATE) {ThecurrentDate = new date (); var adivhtml = "<div id = /" " thename " _MONTHVIEW / "Onblur = /" document. JSMONTHVIEW.DELETEMONTHGRID (); / ">"; itDivhtml = "<Table Width =</p> <p>/ "" this.width.toString () "/" height = / "" this.height.tostring () "/" style = / " this.monthgridStyle " / "cellpadding = /" 0 / "Cellspacing = /" 0 / ">;" THEDIVHTML = "<tr>"; thedivhtml = "<TD align = /" center / ";" TOP / ">"; thedivhtml = "<TABLE Width = / "100% /" height = / "100% /" border = / "0 /" cellspacing = / "0 /" cellpadding = / "0 /">; thedivhtml = "<triagn = /" Center / "style = /" " this.headerstyle " / "; itDivhtml =" <TD> "; thedivhtml =" <input type = / "Button /" TabINDEX = / "- 1 /" Style = / " this.monthbtstyle " / "id = /" " " _GOPREVIOUSMONTH / "value = /" " this.previousmonthtext " / "onclick = /" Document.jsmonthView.UpdateMonthgrid (this) / "Onblur = /" Document.jsmonthView.deleteMonthgrid () / ">"; THEDIVHTML = "</ td>"; Twivhtml = "<TD>"; THEDIVHTML = "<select id = /" Thename "_Yearlist /"> ";" = "</ select>"; itDivhtml = "</ td>"; thedivhtml = "<td>"; thediVHTML = "<select id = /" thename "_MONTHLIST /"> "; itDivhtml =" </ select> "; thedivhtml =" <</p> <p>INPUT TYPE = / "hidden /" id = / "" THENAME "_Daylist /" value = / "1 /"> "; itDivhtml =" </ td> "; TDIVHTML =" <TD> "; TDIVHTML = "<input type = /" button / "tabindex = /" - 1 / "style = /" " this.monthbtstyle " / "id = /" " Thename " _gOnextMonth / "value = /" " this.NextMonthText "/" onClick = / "document.jsMonthView.UpdateMonthGrid (this) /" onBlur = / "document.jsMonthView.DeleteMonthGrid () /"> "; theDivHTML =" </ td> "; theDivHTML = "</ TR>"; TwivHTML = "<tr>"; thedivhtml = "<TD colspan = /" 4 / "bgcolor = /" this.unselectbgcolor "/"; thedivhtml = " <DIV ID = / " Thename " _MONTHGRID / "> <br> </ div>"; itDivhtml = "</ td>"; itDivhtml = "</ tr>"; thedivhtml = "</ Table> "; THEDIVHTML =" </ td> "; Twivhtml =" </ TR> "; Twivhtml =" </ TABLE> "; Twivhtml =" </ div> "; Document.Body.insertAdjacenthtml "beforeEnd", theDivHTML); theDivObject = document.all.item (theName "_MonthView"); theDivObject.style.position = "absolute"; theDivObject.style.posLeft = this.GetoffsetLeft (this.Source); th EdivObject.style.postop = this.getoffsettop (this.Source) this.source.offsetheight;</p></div><div class="text-center mt-3 text-grey"> 转载请注明原文地址:https://www.9cbs.com/read-98273.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="98273" 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.035</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 = 'K1BK1P1F7tz1pYY575ZcOHcpODgMeyi5Nlq_2F_2FBOMMnPr9VBhcmQR6tcgD8LGfhQQ0bYco22XJihdJBGM'; 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>