<分区>
标签 javascript html css
如何使用 Javascript 制作一个在同一网页中打开而不会在不同窗口中打开的弹出窗口?如何在打开时将弹出窗口后面的背景变暗?
最佳答案
为此使用 JQuery Dialog。首先在您的 HTML 中创建一个 div 包括 Jquery.js 和 jquery.UI 并且还放置 modal =true 来使背景变暗
<div id="DialogBox"></div>
$("#DialogBox").dialog({
height: 600,
width: 600,
modal: true,
buttons: [
{
text: "Close",
click: function () {
$(this).dialog("close");
}
}]
});
关于javascript - 如何在窗口中弹出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25762449/
相关文章:
javascript - 如何在这个 getter/setter 场景中实现 ng-model 绑定(bind)?
javascript - 使用原型(prototype)在 javascript 中反转字符串
javascript - IndexOf Javascript 替代方案
javascript - jQuery 这个父 prev 选择器不工作
html - 在另一个元素底部对齐 DIV 会导致菜单在 IE7 中不显示
javascript - 我希望表格具有隐藏的输入字段,仅当我单击它们时才会出现