【发布时间】:2014-05-19 19:06:25
【问题描述】:
我已经尝试过这段代码。
<title></title>
<script type="text/javascript" src="JavaScripts/jquery-1.4.1.js"> </script>
<script type="text/javascript">
$('#MyButton').click(function () {
$('#DropDownList2').val("3");;
});
</script>
<asp:DropDownList ID="DropDownList2" runat="server" ClientIDMode="Static"
onselectedindexchanged="DropDownList2_SelectedIndexChanged">
<asp:ListItem Selected="True">SELECT</asp:ListItem>
<asp:ListItem Value="1">23</asp:ListItem>
<asp:ListItem Value="2">32</asp:ListItem>
<asp:ListItem Value="3">44</asp:ListItem>
<asp:ListItem Value="4">61</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="MyButton" runat="server" Text="MAX" />
但它不是接缝工作。我不知道我是否使用了正确版本的 jquery 文件。 请检查 如果有使用或不使用 jquery 的任何替代方法 谢谢
【问题讨论】:
-
您的大写按钮似乎坏了...
-
OP 提出的重复问题。 @user3651976 您应该让回答者回答您的其他问题中没有解决的问题
-
请准确地提出您的问题。