将 div 显示为模态弹出窗口 [英] Show a div as a modal pop up

查看:16
本文介绍了将 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 显示为模态弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆