<select name="cCode" onchange="fquery.submit();">
<option></option>
<option value = "AN323"> 111</option >
<option value = "AN32311"> 222</option >
</select>
<option></option>
<option value = "AN323"> 111</option >
<option value = "AN32311"> 222</option >
</select>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Expires" content="0">
<link HREF="../css/styles.css" REL="STYLESHEET" TYPE="text/css">
<title>test</title>
<script language="JavaScript">
<!--
function su()
{
fquery.action = "test.asp?tmp=" + fquery.cCode.options[fquery.cCode.selectedIndex].value;
fquery.submit();
}
//-->
</script>
</head>
<body>
<form name=fquery method=post action="Page">
<input type=hidden name="search" value=Y>
<div align="center"><center><table border="0" cellspacing='1' cellpadding='0' class="DTab">
<tr><th class="DTh">
test
<select name="cCode" onchange="su()">
<option></option>
<option value = "AN323"> 111</option >
<option value = "AN32311"> 222</option >
</select>
</th></tr>
</table></center></div>
</form>
</body>
</html>
<script>
fquery.cCode.onchange=fquery.submit;
</script>
那如果是写在js文件里,要在这里引入怎么办?
<select name="select" onChange="this.form.aaa.value=this.value;">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<br>
<br>
<input type="text" name="aaa">
</form>
那如果是写在js文件里,要在这里引入怎么办?
var radGroup=document.all(radName);
for(var iCnt=0;iCnt<radGroup.length;iCnt++)
if(radGroup[iCnt].checked) return radGroup[iCnt].value;
}
function SelectedChange(selecter)
{
alert(selecter.options[selecter.selectedIndex].value);// use this to get Selected Value
// add your code to refresh page here.
}
</script>=-------------------
hope this would be helpful.
^_^