点一下单选按钮“月”,激活1~12的的下拉框;

来源:百度知道 编辑:UC知道 时间:2024/07/06 21:46:16
请教asp的问题:我想做一个填出生年月的表单。点一下单选按钮“月”,激活“1--12”的下拉选框;点一下单选按钮“年”,激活若干年份的下拉选框;代码怎么写呀?请高手指教!

你的问题不是很清楚。按上面的意思你试试这样,希望能给你点启示。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
function chknd1(){
form1.select1.disabled=false;
form1.select2.disabled=true;
}
function chknd2(){
form1.select2.disabled=false;
form1.select1.disabled=true;
}

</script>
</head>

<body>
<form name="form1" method="post" action="">
<input type="radio" name="radiobutton" value="radiobutton" onClick="chknd1();">

<select name="select1" disabled>
<option value="1">1</option>
<option value="2">2</option>
<option value=&q