列表中判断那个月有几天的问题!各位大哥,帮忙看看这个代码错在那了!
<form id= "form1 " name= "form1 " method= "post " action= " ">
<table width= "200 " border= "1 " align= "center ">
<tr>
<td>
<select name= "select " onchange= "estimation() ">
<script language= "javascript ">
var time=new Date();
var year=time.getYear();
var len=50;
var lens=year-len;
document.form1.select.length=len;
for(i=0;i <len;i++)
{
document.form1.select.options[i].text=lens+i+1;
document.form1.select.options[i].value=lens+i+1;
}
</script>
</select>
</td>
<td> 年 </td>
<td>
<select name= "select2 " onchange= "estimation() ">
<script>
document.form1.select2.length=12;
for(j=0;j <12;j++)
{
document.form1.select2.options[j].text=j+1;
document.form1.select2.options[j].value=j+1;
}
</script>
</select>
</td>
<td> 月 </td>
<td> <select name= "select3 ">
<script language= "javascript ">
function estimation()
{
var years=document.form1.select.text;
var months=document.form1.select2.text;
if(months==4||months==6||months==9||months==11)
{
document.form1.select3.length=30;
for(m=0;m <30;m++)
{
document.form1.select3.options[m].text=m+1;
document.form1.select3.options[m].value=m+1;
}
}
else if(months==1||months==3||months==5||months==7||months==8||months==10||months==12)
{
document.form1.select3.length=31;
for(k=0;k <31;k++)
{
document.form1.select3.options[k].text=k+1;
document.form1.select3.options[k].value=k+1;
}
}
else if(months==2&&((years%4==0&&a