gpt4 book ai didi

javascript - jquery:父模式对话框文本框不可编辑

转载 作者:行者123 更新时间:2023-12-02 20:29:59 24 4
gpt4 key购买 nike

jquery ui.dialog 打开模式对话框后,如果我再次打开另一个模式对话框并关闭它,文本框将锁定在父对话框中。我无法解决这个问题。如果我打开一个非模式对话框,它工作正常,但是父对话框可以关闭,如何解决,谢谢,在线等待

html:(dotnet mvc2)

<input id="btnDlg" type="button" value="open dialog"/>
<div id="dlg1"><%=Html.TextBox("txtName","can not edit") %><input id="btnShowDlg" type="button" value="dialog again" /></div>
<div id="dlg2"><div>the second dialog</div><%=Html.TextBox("txtName2") %></div>

jquery:

//first modal dialog
$("#dlg1").dialog({
autoOpen: false,
height: 350,
width: 300,
title: "The first dialog!",
bgiframe: true,
modal: true,
resizable: false,
buttons: {
'Cancel': function() {
$(this).dialog('close');
},
'OK': function() {
$(this).dialog('close');
}
}
})
//second modal dialog
$("#dlg2").dialog({
autoOpen: false,
height: 200,
width: 300,
title: "This is the second dialog!",
bgiframe: true,
modal: true,
resizable: false,
buttons: {
'Cancel': function() {
$(this).dialog('close');
},
'OK': function() {
$(this).dialog('close');
}
}
})
//show the first modal dialog
$("#btnDlg").click(function() {
$("#dlg1").dialog("open");
})
//show the second modal dialog
$("#btnShowDlg").click(function() {
$("#dlg1").dialog("options", "hide",true);
$("#

dlg2").dialog("open");
})

最佳答案

我刚刚想出来了,以防万一某人需要答案但找不到答案

需要将 #btnShowDlg 的 CSS 文件中的 z-index 更改为此(不完全是)# 638746,然后是字段模式预览中是可编辑的。无需更改任何其他内容:)

只需转到您的 css 文件,找到 #btnShowDlg 并更改或设置 z-index:638746;

关于javascript - jquery:父模式对话框文本框不可编辑,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4321453/

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