87,910
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<script type="text/javascript" language="javascript">
function add()
{
var myselect=document.getElementById("myselect");
for(var i=1;i<=12;i++)
{
var inner=myselect.innerHTML;
myselect.innerHTML=inner+"<option>"+i+"</option>";
}
}
</script>
<body onLoad="add()">
<form id="form1" name="form1" method="post" action="">
<label>
<select name="myselect" id="myselect">
</select>
</label>
</form>
</body>
</html>