如何使jQuery的对话模式? [英] How to make jQuery dialog modal?
本文介绍了如何使jQuery的对话模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用asp.net jQuery的对话框。这是对我工作的罚款。问题是,当我打开的对话框中,我仍然可以正常工作父页面的功能。我不希望出现这种情况。只是对话框模态,不应该让父母注重页面上。
I am using jQuery dialog in asp.net. It is working fine for me. The problem is when I open the dialog box, I can still work parent page functionality. I don't want that. Just dialog to modal and should not allow focus on parent page.
window.onload = function onloadFunction() {
//setup edit person dialog
$('#uploadPic').dialog({
autoOpen: false,
draggable: true,
title: "Upload Picture",
open: function(type, data) {
$(this).parent().appendTo("form");
}
});
}
有没有什么办法让它模态?或者,如果失去了重心上对话框会自动关闭它?
Is there any way to make it modal? Or if lost focus on dialog box close it automatically?
请帮助我。
推荐答案
使用
$('#uploadPic').dialog({
autoOpen: false,
modal: true,
draggable: true,
title: "Upload Picture",
open: function(type, data) {
$(this).parent().appendTo("form");
}
});
}
我刚添加的模式选项,您的样品。
I have just added the modal option to your sample.
这篇关于如何使jQuery的对话模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文