如何在文本框中显示下拉列表的选中的值

来源:互联网 发布:sql update 多表关联 编辑:程序博客网 时间:2024/05/16 15:37
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>

单击以下代码运行演示:

<html>
<title>阿里西西——WEB开发</title>
<head>
</head>
<body>
<form name="form1">
<select name="menu1" onChange="document.form1.get.value=this.options[this.selectedIndex].value">
<option selected>请选择</option>
<option value="http://www.alixixi.com/">阿里西西网站</option>
<option value="http://www.alixixi.com/bbs/">阿里西西论坛</option>
<input type="text" value="初始值" size="30" name="get" id="get">
</form>
</body>
</html>

<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>