In a real-world open system, we often need to query data records between two dates. This is used to date linkage. General online Some mostly is a linkage rarely see two. I am here to provide two linkage for your reference. Create an HTML file and copy it into the code below.
<title> Sales fuzzy Query </title><body >
<div align= "center" ><font color= "#0000FF" size= "2" ><strong> Sales Enquiry System </strong></font>
</div>
<form name= "Form1" >
<table cellspacing=10 cellpadding=0 width=75% align=center border=0>
<TBODY>
<TR>
<TD> Start date (shipping) </TD>
<TD colspan= "2" ><select name=yyyy >
<option value= "" > Please select the year </option>
</select>
Years
<select name=mm >
<option value= "" > select month </option>
</select>
Month
<select name=dd>
<option value= "" > Choice Day </option>
</select>
Day </TD>
</TR>
<TR>
<TD> End Date (shipping) </TD>
<TD colspan= "2" ><select name=year >
<option value= "" > Please select the year </option>
</select>
Years
<select name=month >
<option value= "" > select month </option>
</select>
Month
<select name=day>
<option value= "" > Choice Day </option>
</select>
Day </TD>
</TR>
<TR>
<TD width=93> Customer Name </TD>
<TD colspan= "2" > <font color= "#FF0000" >
<select name=customname >
<option selected> All Customers
</select>
</font></TD>
</TR>
<TR>
<TD> Display number per page </TD>
<TD colspan= "2" ><select name=pagesize >
<option selected>10
<option>20
<option>50
<option>100 </select></TD>
</TR>
<TR>
<TD height= > </TD>
<TD width= "270" > <div align= "Center" >
<input class=buttonface type=submit value= confirm name=submit>
<input class=buttonface type=reset value= Reset name=submit2>
</div></TD>
</TR>
</TBODY>
</TABLE>
</TD></TR></TBODY></TABLE>
</FORM>
<script language= "JavaScript" ><!--
function Yyyymmddstart ()
{
Monhead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
First, give the Nianxia box to the content
var y = new Date (). getFullYear ();
for (var i = (y-30); i < (y+30); i++)//This year, the first 30 years, after 30 years
{
Document.form1.YYYY.options.add (New Option ("" + i + "", I));
Document.form1.Year.options.add (New Option ("" + i + "", I));
}
Drop down box to assign month
for (var i = 1; i < i++)
{
Document.form1.MM.options.add (New Option ("" + i + "", I));
Document.form1.Month.options.add (New Option ("" + i + "", I));
}
Document.form1.YYYY.value = y;
Document.form1.Year.value = y;
Document.form1.MM.value = new Date (). getmonth () + 1;
Document.form1.Month.value = new Date (). getmonth () + 1;
var n = monhead[new Date (). getmonth ()];
if (new Date (). getmonth () ==1 && ispinyear (yyyyvalue)) n++;
Writeday (31); Assignment Date dropdown box Author:meizz
Document.form1.DD.value = new Date (). GetDate ();
Document.form1.Day.value = new Date (). GetDate (); Add
}
function Yyyydd (str)//year change date changes (mainly judged by leap excepting)
{
var mmvalue = Document.form1.mm.options[document.form1.mm.selectedindex].value;
if (Mmvalue = = "") {var e = Document.form1.DD; Optionsclear (e); return;}
var n = monhead[mmvalue-1];
if (Mmvalue ==2 && ispinyear (str)) n++;
Writeday (N)
var MMvalue2 = Document.form1.month.options[document.form1.month.selectedindex].value;
if (MMvalue2 = = "") {var e = Document.form1.Day; Optionsclear (e); return;}
var m = monhead[mmvalue2-1];
if (MMvalue2 ==2 && ispinyear (str)) m++;
Writeday (M)
}
Function MMDD (str) //month Change date linkage
{
var yyyyvalue = Document.form1.yyyy.options[document.form1.yyyy.selectedindex].value;
if (yyyyvalue = = "") {var e = Document.form1.DD; Optionsclear (e); return;}
var n = monhead[str-1];
if (str ==2 && ispinyear (yyyyvalue)) n++;
// writeday (n)
var YYYYvalue2 = Document.form1.year.options[document.form1.year.selectedindex].value;
if (YYYYvalue2 = = "") {var e = Document.form1.Day; Optionsclear (e); return;}
var m = monhead[str-1];
if (str ==2 && ispinyear (yyyyvalue)) m++;
//writeday (m)
}
function Writeday (n)//drop down box with conditional write date
{
var e = Document.form1.DD; Optionsclear (e);
for (var I=1; i< (n+1); i++)
E.options.add (New Option ("" + i + "", I));
var ee = Document.form1.Day; Optionsclear (EE);
for (var j=1; j< (n+1); j + +)
Ee.options.add (New Option ("" + j + "", j));
}
function Ispinyear (year)//judge whether the leap excepting
{return (0 = year%4 && (year%100!=0 | | year%400 = = 0));}
function Optionsclear (e)
{
for (var i=e.options.length; i>0; i--)
E.remove (i);
}
--></script>
</body>