-------------date.HTML
<HTML>
<style>
input{font-family: "宋体"; font-size:9pt;height:15px;border:0px black solid;background:#f0f0f0;cursor:hand;background:none}
td{font-family: "宋体"; font-size:9pt;}
select{font-family: "宋体"; font-size:9pt;}
.input1{font-family: "宋体"; font-size:9pt;height:18px;line-height: 12pt;border:1px black solid;background:#e0e0e0}
</style>
<script language="javascript">
function checkinput()
{
while (isNaN(document.all.years.value) || (document.all.years.value==" "))
{
document.all.years.value=years.value.substring(0,years.value.length-1)
}
}
function numberofdays(month,year)
{
var numdays=new Array(31,28,31,30,31,30,31,31,30,31,30,31)
n=numdays[month]
if (month==1&&year%4==0) ++n
return n
}
function displaydates(day,month,year,shade){
d=new Date(year,month,1)
var startday=d.getDay()
var numdays=numberofdays(month,year)
var numrows=Math.ceil((numdays+startday)/7)
var tmps=""
if((numdays+startday)%7>1) ++numrows
var currentdate=0
tmps="<table border=0 cellpadding=0 cellspacing=0><tr><td align='center'>日</td><td align='center'>一</td><td align='center'>二</td><td align='center'>三</td><td align='center'>四</td><td align='center'>五</td><td align='center'>六</td></r>"
for (var i=0;i<numrows;++i)
{
tmps=tmps+"<tr>"
for(var j=0;j<7;++j){
if (shade&&day==currentdate&¤tdate<numdays&&i*7+j>=startday)
tmps=tmps+"<td bgcolor='#cccccc' style='border:1px solid #909090'>"
else tmps=tmps+"<td>"
if(currentdate>=numdays) tmps=tmps+" "
else if(currentdate>0){
++currentdate
tmps=tmps+writedate(currentdate)
} else if(i*7+j>=startday){
++currentdate
tmps=tmps+writedate(currentdate)
}else tmps=tmps+" "
tmps=tmps+"</td>"
}
tmps=tmps+"</tr>"
}
tmps=tmps+"</table>"
return tmps
}
function writedate(n){
return "<input type='button' value='"+n.toString()+"' style='width:20' onclick='setvalue("+n.toString()+")'>"
}
funct