This is an improvement on the original calendar control, beginning with more in line with Chinese habits. The improved code is shown below. Save it as rl. asp and add it to the file to be called. <! -- # INCLUDE file = "rl. asp "-->, the call in the control is as follows, mainly for onfocus and onblur events <input name = "gcrq" type = "text" id = "gcrq" value = "<% = date (now) %> "onFocus =" CreateMonthView (this) "onBlur =" DeleteMonthView (this) ">
Main content of rl. asp
<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN">
<Script language = "javascript">
<! --
// This is jsMonthView 1.0, author is Chinese DengKang ).
// I allow your do any modify, but I don't bear any liability.
// Browser: IE 4 and later
Function DefineMonthView (theTextObject) {// the month view construct function
This. GetOnlyName = function () {// create one and only name on the document
Var theName = "MV"; // prefix
Var aryName = new Array ();
AryName [0] = "_ MonthView"; // the month view main body's name postfix
AryName [1] = "_ MonthGrid"; // the month view day area's name postfix
AryName [2] = "_ goPreviousMonth"; // the month view go previous month button's name postfix
AryName [3] = "_ goNextMonth"; // the month view go next month button's name postfix
AryName [4] = "_ YearList"; // the month view year list's name postfix
AryName [5] = "_ MonthList"; // the month view month list's name postfix
AryName [6] = "_ DayList"; // keep the month view current day's element name postfix
Var I =-1, j = 0, maxi = 2000;
Var exTag = true;
While (exTag = true) & (I <maxi )){
I ++;
ExTag = false;
For (j = 0; j <aryName. length; j ++ ){
If (document. all. item (theName + I. toString () + aryName [j])! = Null ){
ExTag = true;
}
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service