//
下拉选择,文本输入框同步
function ShowReasonInTextBox(ddl, txtId) { var nowText
=
ddl.options[ddl.selectedIndex].text;
if
(nowText
!=
""
) { document.getElementById(txtId).value
=
nowText; }s
else
{ document.getElementById(txtId).value
=
""
; } }
//
下拉列表
<
asp:DropDownList ID
=
"
ddlReason0
"
runat
=
"
server
"
style
=
"
width:600px;
"
AutoPostBack
=
"
false
"
onchange
=
"
ShowReasonInTextBox(this,'Reason');
"
>
</
asp:DropDownList
>
<
asp:DropDownList ID
=
"
ddlReason1
"
runat
=
"
server
"
style
=
"
width:600px;
"
AutoPostBack
=
"
false
"
onchange
=
"
ShowReasonInTextBox(this,'Reason');
"
>
</
asp:DropDownList
>
<
asp:DropDownList ID
=
"
ddlReason2
"
runat
=
"
server
"
style
=
"
width:600px;
"
AutoPostBack
=
"
false
"
onchange
=
"
ShowReasonInTextBox(this,'Reason');
"
>
</
asp:DropDownList
>
//
多行文本框
<
textarea id
=
"
Reason
"
runat
=
"
server
"
style
=
"
width: 600px;
"
class
=
"
input
"
rows
=
"
8
"
></
textarea
>
转载于:https://www.cnblogs.com/yy-sun/archive/2011/03/29/1998777.html
转载请注明原文地址: https://win8.8miu.com/read-1487029.html