gpt4 book ai didi

jquery - jqModal 对话框始终处于叠加状态

转载 作者:行者123 更新时间:2023-12-01 01:11:54 29 4
gpt4 key购买 nike

我有以下代码,但我束手无策,因为对话框总是出现在覆盖层下。任何建议将不胜感激:

<head runat="server">
<title></title>
<link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#shift-edit-popup
{
display: none;
}
</style>
<script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="../Scripts/jqModal.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#shift-edit-popup").jqm({
toTop: true
}).jqmAddTrigger("#show-button");
});
</script>
</head>
<body>
<form id="form" runat="server">
<input id="show-button" type="button" value="Show" />
<div id="shift-edit-popup">
<div>
<asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label>
<asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px">
</asp:DropDownList>
</div>
</div>
</body>

最佳答案

根据我所看到和尝试,您需要在对话框 div 上使用包含的 jqmWindow 类并删除此:

<style type="text/css">
#shift-edit-popup
{
display: none;
}
</style>

您的代码应如下所示:

<head runat="server">
<title></title>
<link href="Scripts/jqModal.css" rel="stylesheet" type="text/css" />

<script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="Scripts/jqModal.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#shift-edit-popup").jqm({
toTop: true,
modal: true
}).jqmAddTrigger("#show-button");
});
</script>
</head>
<body>
<form id="form" runat="server">
<input id="show-button" type="button" value="Show" />
<div id="shift-edit-popup" class="jqmWindow">
<div>
Resource:
<select><option value="1">One</option><option value="2">Two</option></select>
</div>
</div>
</body>

(您只需相应地更改脚本和CSS引用)

关于jquery - jqModal 对话框始终处于叠加状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2745022/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com