是否可以在javascript打开模态对话框时创建虚​​拟URL [英] is it possible to create dummy url when modal dialog box open by javascript

查看:56
本文介绍了是否可以在javascript打开模态对话框时创建虚​​拟URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如

看到这个网站,

www.housing.com

然后在顶部的帖子要求链接就在那里在模态中打开,但它创建了虚拟URL。

for example
see this website,
www.housing.com
then in the top "Post requirement "link is there it open in modal but it create dummy url.

推荐答案

我可以给你逻辑。

逻辑



  • 单击链接时,打开一个模态(这里他们使用了Bootstrap)并附加/ post-requirement到URL Box中的现有URL。
  • 您还需要在页面加载时检查此URL并加载模态(如果找到)。你可以测试一下。只需复制该URL并打开一个新选项卡即可。你会看到它会直接打开Modal。因此,如果找到该URL,则需要在页面加载上检查并显示模态。
I can give you the logic.

Logic


  • When the link is clicked, you open a Modal (here they have used Bootstrap) and append a "/post-requirement" to the existing URL in the URL Box.
  • You also need to check this URL while Page load and load the Modal if you find that. You can test that. Just copy that URL and open a new tab with that. You will see that it would open the Modal directly. So, you need to check that on Page Load and show Modal if you find that URL.


这篇关于是否可以在javascript打开模态对话框时创建虚​​拟URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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