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

查看:123
本文介绍了将div显示为模式弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下div:

 < div id =divAlert> 
< div id ='divAlertText'>您必须选择一种语言。< / div>
< div id ='divAlertButton'class ='btn blue'onclick =HideAlert();>好< / div>
< / div>

这个HTML页面有更多的div和按钮。我想要显示 divAlert 作为模态弹出窗口。



我知道jQuery中有一些东西,我认为,我可以用填充整个页面的半透明黑色背景来显示我的div。但是我不记得它的名字。



有什么建议吗?

解决方案

你可以使用jquery dialog widget

http://jqueryui.com/演示/对话框/


I have the following div:

<div id="divAlert">
    <div id='divAlertText'>You must select a language.</div>
    <div id='divAlertButton' class='btn blue' onclick="HideAlert();">Ok</div>
</div>

Is this HTML page there are more divs and buttons. I want to show divAlert as a modal pop up.

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.

Any advice?

解决方案

you can use jquery dialog widget

http://jqueryui.com/demos/dialog/

这篇关于将div显示为模式弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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