如何创建可拖动的弹出窗口? [英] how to create a dragable pop up window?

查看:91
本文介绍了如何创建可拖动的弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目,每当我要添加内容时,我只需单击按钮添加,就会出现一个弹出窗口。现在,我现在有了弹出窗口,它将为我的项目添加必要的信息。我想要的是我可以随时拖动该窗口,因为我创建的弹出窗口固定在中心。怎么做?

解决方案

例如,点击这里: http:// jqueryui。 com / dialog [ ^ ]。



它会显示一些页面Web,中间是圆角矩形,类似于Windows窗口,标题为基本对话框。尝试通过这个标题栏拖动它。可拖动?那就是你可以使用的。

这是文档: http://api.jqueryui.com/dialog [ ^ ]。



当然,您可以使用真实的浏览器窗口: http://www.w3schools.com /jsref/met_win_open.asp [ ^ ] 。



如果您阅读上面提到的文档,您会看到固定在中心只是您想象中的问题,因为事实上您可以控制一个窗口。



但是,我不推荐第二个选项。首先,根据参数和选项,它可以创建选项卡而不是单独的窗口。此外,在许多情况下,不建议使用弹出窗口。首先,它们会激怒许多用户,主要是因为广告弹出窗口污染了这么多网站的令人讨厌的经历。许多用户会使用一些基于浏览器的插件阻止弹出窗口。



-SA


< blockquote>参考:



http://www.aspdotnet-suresh.com/2011/04/ajaxdragpanelextender-example-or-how-to.html [ ^ ]


I have a project that whenever I am going to add something, I will just Click the Button add and a pop up window will appear. Now, I have now that pop up window that will add the necessary information for my project. What I want is that I can drag that window whenever I want since the pop up window that I created is fixed at the center. How to make that?

解决方案

For example, click here: http://jqueryui.com/dialog[^].

It will show you some page Web with the rounded rectangle in the middle, resembling a Windows window with the title "Basic dialog". Try to drag it by this "title bar". Draggable? then this is what you can use.
This is the documentation: http://api.jqueryui.com/dialog[^].

Of course, you can use "real" browser window: http://www.w3schools.com/jsref/met_win_open.asp[^].

If you read the documentation referenced above, you will see that "fixed in the center" is just your imaginary problem, because in fact you can control the location of a window.

However, I would not recommend this second option. First, depending on parameters and options, it can create a tab instead of a separate window. Also, in many cases, pop-ups are not recommended. First of all, they will irritate many users, mostly because of nasty experience of having ads pop-ups contaminating so many sites. Many users will block pop-ups using some browser-based plug-ins.

—SA


Refer this:

http://www.aspdotnet-suresh.com/2011/04/ajaxdragpanelextender-example-or-how-to.html[^]


这篇关于如何创建可拖动的弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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