我编写了一个代码,用于在 asp.net 中打开一个现代弹出窗口,该代码运行良好。但我也想使用从 deopdown 列表中选择数据来打开弹出窗口。这是一个代码,当用户单击按钮时,我有一个打开弹出窗口的代码,但是我如何使用从弹出的 dropdonwn 列表中选择项目打开弹出窗口说升级会员资格。
<asp:DropDownList ID="ddWeek" class="contact-input" runat="server" Width="400px"
AutoPostBack="True" OnSelectedIndexChanged="ddWeek_SelectedIndexChanged">
</asp:DropDownList>
<div id="modal">
<div id="headingpop2">
Select You Plane for Upgrade Membership
</div>
<div id="contentpop2">
<p>Select you plan as per you like to Upgrade</p>
<a runat="server" href="Becomeamember.aspx"
class="buttonpop green close" style="margin-top: 140px; margin-right:
230px;">
<img src="images/tick.png">Upgrade Now</a> <a style="margin-top: 140px;
margin-right: 50px;"
href="#" class="buttonpop red close">
<img src="images/cross.png">Cancel</a>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$('#button1').click(function (e) { // Button which will activate our modal
$('#modal').reveal({ // The item which will be opened with reveal
animation: 'fade', // fade, fadeAndPop, none
animationspeed: 600, // how fast animtions are
closeonbackgroundclick: true, // if you click background
// will modal close?
dismissmodalclass: 'close' // the class of a button or
//element that will close an open modal
});
return false;
});
});
</script>
此代码适用于 Button,但我希望它也适用于下拉列表。任何人都知道我该怎么做,请帮帮我。
谢谢你