28,409
社区成员




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
<script language="javascript">
function c1()
{
document.getElementById("DropDownList1").selectedIndex=2;
c2();
}
function c2()
{
document.getElementById("TextBox2").value="下拉框改变了";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onkeypress="c1()"></asp:TextBox><asp:DropDownList
ID="DropDownList1" runat="server" onchange="c2()">
<asp:ListItem Value="1">原始状态</asp:ListItem>
<asp:ListItem Value="2">2</asp:ListItem>
<asp:ListItem Value="3">第一个输入框改变了</asp:ListItem>
<asp:ListItem Value="4">4</asp:ListItem>
</asp:DropDownList><asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>