python输入年份月份输出天数_输入年份和月份,输出该月天数

/p>

html

PUBLIC

"-//W3C//DTD

XHTML

1.0

Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

111

document.write("

请输入你所查询的年份和选择你所查询的月份

");

function myselect()

{

var a=document.getElementById("mySelect");//

document

对象中,获取

select

标签

var

b=a.options[a.selectedIndex].value;

//select

--a.options[];

然后,选定项的下标是

--a.selectedIndex

fm = document.form1;

if (fm.year.value=="")

{

alert("

请输入年份

");

}

else

{

if ((fm.year.value%400==0)||(fm.year.value%4==0&&fm.year.value%100!=0))

{

if(b==28)

{

b=29;

}

}

alert("

这个月有

"+b+"

");

}

}

color="#00FF33">

type=text

name=year

maxlength=4>

color="#00FF33">

月份:

January

February