在input id=“textbox1”中加入runat=”server“则无法实现效果
<formid="form2"name="form1"method="post"action=""><inputid="textbox1"type="text"name=...
<form id="form2" name="form1" method="post" action="">
<input id="textbox1" type="text" name="aa" runat="server" />
<select id="select1" runat="server" onchange="bbb(this.value)"></select>
<script language="javascript">
function bbb(values) {
if (document.all.aa.value == "") {
document.all.aa.value = values;
}
else {
document.all.aa.value = document.all.aa.value + "," + values;
}
}
</script>
</form> 展开
<input id="textbox1" type="text" name="aa" runat="server" />
<select id="select1" runat="server" onchange="bbb(this.value)"></select>
<script language="javascript">
function bbb(values) {
if (document.all.aa.value == "") {
document.all.aa.value = values;
}
else {
document.all.aa.value = document.all.aa.value + "," + values;
}
}
</script>
</form> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询