哦,看错了
<script language="javaScript">
function change()
{
if(document.form1.myselect1.value=="1") {
document.form1.myselect2.value=3;
}
if(document.form1.myselect1.value=="2") {
document.form1.myselect2.value=4;
}
}
</script>
<html>
<body>
<form name="form1">
<select name="myselect1" onchange="change()">
<option>请选择</option>
<option value="1">选项一</option>
<option value="2">选项二</option>
</select>
<select name="myselect2">
<option value="3">匹配选项一</option>
<option value="4">匹配选项二</option>
</select>
</form>
</body>
</html>
用Ajax也可以做。。。网上有的查
<script language="javaScript">
function change()
{
if(document.form1.myselect1.value=="1") {
document.form1.myselect2.value=3;
}
if(document.form1.myselect1.value=="2") {
document.form1.myselect2.value=4;
}
}
</script>
<html>
<body>
<form name="form1">
<select name="myselect1" onchange="change()">
<option>请选择</option>
<option value="1">选项一</option>
<option value="2">选项二</option>
</select>
<select name="myselect2">
<option value="3">匹配选项一</option>
<option value="4">匹配选项二</option>
</select>
</form>
</body>
</html>
用Ajax也可以做。。。网上有的查
[此贴子已经被作者于2006-12-5 19:51:38编辑过]
曾经以为百般艰难,蓦然回首,才发现已飞渡千山。。!