日期:2014-05-17 浏览次数:20639 次
<select name="gender" style="width:200; margin-left:50px;" id="Yearselect">
<script type="text/javascript">
var yselect=document.getElementById("Yearselect")
var year = new Date()
var nYear = year.getFullYear()
while(nYear >= 1970 )
{
yselect.options.add(new Option(nYear + "年", nYear-1970))//这里的年怎么就加不上?
nYear--
}
</script>
</select>
<html>
<head>
</head>
<body>
<select name="gender" style="width:200; margin-left:50px;" id="Yearselect">
</select>
</body>
<script type="text/javascript">
var yselect=document.getElementById("Yearselect")
var year = new Date()
var nYear = year.getFullYear()
while(nYear >= 1970 )
{
yselect.options.add(new Option(nYear + "年", nYear-1970))//这里的年怎么就加不上?
nYear--
}
</script>
</html>