Show a div as a modal pop up(将 div 显示为模态弹出窗口)
问题描述
我有以下 div:
<div id="divAlert">
<div id='divAlertText'>You must select a language.</div>
<div id='divAlertButton' class='btn blue' onclick="HideAlert();">Ok</div>
</div>
这个 HTML 页面是否有更多的 div 和按钮.我想将 divAlert
显示为模式弹出窗口.
Is this HTML page there are more divs and buttons. I want to show divAlert
as a modal pop up.
我知道在 jQuery 中有一些东西,我想,我可以用它来显示我的 div,用一个半透明的黑色背景填充整个页面.但我不记得它的名字了.
I know there is something in jQuery, I think, that I can use to show my div with a half transparent black background filling the entire page. But I can't remember its name.
有什么建议吗?
推荐答案
你可以使用jquery对话框小部件
you can use jquery dialog widget
http://jqueryui.com/demos/dialog/
这篇关于将 div 显示为模态弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:将 div 显示为模态弹出窗口


基础教程推荐
- 如何添加到目前为止的天数? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- npm start 错误与 create-react-app 2022-01-01