向高手请教!!!!!!!!!!!!?

yang2000Tony 2005-12-17 11:15:23
现有一个select框
<select name="bianhao" class=select>
<option selected>……请选择……</option>
..........................(中间程序省略)

</selcet>

现要使每次select选择一个值,都能对另外两个text gname和type框进行控制显示如何实现?

例如:select框选择的value=1 则gname的value=aaa type的value=bbb


如何实现?
望高手赐教!
...全文
73 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ybfqlyq 2005-12-19
  • 打赏
  • 举报
回复
樓上正解!
fypoop 2005-12-17
  • 打赏
  • 举报
回复
<html>
<head>
<title>
</title>
<script language="vbscript">
sub bianhaoonclick(sValue)
if sValue=1 then
document.all.gname.value="aaa"
document.all.type.value="bbb"
end if

if sValue=2 then
document.all.gname.value=""
document.all.type.value=""
end if
end sub

</script>

<head>

<body>
<select name="bianhao" class=select onchange="bianhaoonclick(document.all.bianhao.value)">
<option value="1" selected>A1</option>
<option value="2">A2</option>


</select>

gname<input type="textbox" name=gname>
type<input type="textbox" name=type>
</body>
</html>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧