/p>
html
PUBLIC
"-//W3C//DTD
XHTML
1.0
Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
111document.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