日期:2014-05-18 浏览次数:20518 次
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body style="margin:0">
<div>
<select id="Select1" style="z-index: 102; left: 233px; position: absolute; top: 95px">
<option selected="selected"></option>
</select>
</div>
<script type="text/javascript" language="javascript">
var d=new Date();
for (i=2000;i<=d.getFullYear();i++)
{
var option=document.createElement("option");
document.getElementById("Select1").options.add(option);
option.innerText=i;
option.value=i;
}
</script>
</body>
</html>
------解决方案--------------------
这个有难度吗?lz不会是课上的练习不做偷懒吧