在asp.net里怎么将列表框(dropdownlist)里的值动过点击按钮放到文本框(textbox)里面啊?
2个回答
展开全部
click事件
用JS获取
<html>
<head>
<script type="text/javascript">
function selection()
{
var rtl=document.getElementById("subject").value;
this.document.getElementById("1").value=rtl;
}
</script>
</head>
<body>
<select name="cars" id="subject" onchange="selection()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<textarea id="1" name="1"> </textarea>
</body>
</html>
用JS获取
<html>
<head>
<script type="text/javascript">
function selection()
{
var rtl=document.getElementById("subject").value;
this.document.getElementById("1").value=rtl;
}
</script>
</head>
<body>
<select name="cars" id="subject" onchange="selection()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<textarea id="1" name="1"> </textarea>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询