asp下拉框选种某个值时,他所对应的id号在另一个文本框中显示,请问如何写代码?
有表bigclass,字段为bigclassid,bigclassname.如何当asp下拉框选种某个值(bigclassname)时,他所对应的bigclassid号在另一个文本框中显示.请问各位该如何写?
------解决方案-------------------- <form name= "myform ">
<select name= "s3 " onchange= "InsertTxt() ">
...
</select>
<input type= "text " name= "gz_meno ">
</form>
<script>
function InsertTxt()
{
if (document.myform.s3.selectedIndex!=0)
{
document.myform.gz_meno.value = " ";
document.myform.gz_meno.value=document.myform.s3.options[document.myform.s3.selectedIndex].value;
}
}
</script>
------解决方案--------------------學習