<legend id='aeTyE'><style id='aeTyE'><dir id='aeTyE'><q id='aeTyE'></q></dir></style></legend>
    <bdo id='aeTyE'></bdo><ul id='aeTyE'></ul>
  • <i id='aeTyE'><tr id='aeTyE'><dt id='aeTyE'><q id='aeTyE'><span id='aeTyE'><b id='aeTyE'><form id='aeTyE'><ins id='aeTyE'></ins><ul id='aeTyE'></ul><sub id='aeTyE'></sub></form><legend id='aeTyE'></legend><bdo id='aeTyE'><pre id='aeTyE'><center id='aeTyE'></center></pre></bdo></b><th id='aeTyE'></th></span></q></dt></tr></i><div id='aeTyE'><tfoot id='aeTyE'></tfoot><dl id='aeTyE'><fieldset id='aeTyE'></fieldset></dl></div>

  • <small id='aeTyE'></small><noframes id='aeTyE'>

    1. <tfoot id='aeTyE'></tfoot>

        Twitter BootStrap 模态窗口后备链接

        Twitter BootStrap Modal Window fallback link(Twitter BootStrap 模态窗口后备链接)
      1. <legend id='SV3By'><style id='SV3By'><dir id='SV3By'><q id='SV3By'></q></dir></style></legend>

                <tbody id='SV3By'></tbody>
              <tfoot id='SV3By'></tfoot>

                  <bdo id='SV3By'></bdo><ul id='SV3By'></ul>

                  <small id='SV3By'></small><noframes id='SV3By'>

                • <i id='SV3By'><tr id='SV3By'><dt id='SV3By'><q id='SV3By'><span id='SV3By'><b id='SV3By'><form id='SV3By'><ins id='SV3By'></ins><ul id='SV3By'></ul><sub id='SV3By'></sub></form><legend id='SV3By'></legend><bdo id='SV3By'><pre id='SV3By'><center id='SV3By'></center></pre></bdo></b><th id='SV3By'></th></span></q></dt></tr></i><div id='SV3By'><tfoot id='SV3By'></tfoot><dl id='SV3By'><fieldset id='SV3By'></fieldset></dl></div>

                  本文介绍了Twitter BootStrap 模态窗口后备链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Twitter Bootstrap 模式窗口.以防模式窗口由于 js 错误而无法工作 - 有一个后备页面.如果模态窗口未加载,我如何确保页面已加载?

                  I am using Twitter Bootstrap modal windows. Just incase the modal windows dont work because of the js error - have a fall back pages. How can i make sure the page is loaded if the modal window doesnt load ?

                  打开模态窗口的链接

                  <a href="#login-modal" data-toggle="modal" data-target="#login-modal">Login</a>
                  

                  模态窗口

                  <!-- Login Modal -->
                          <div id="login-modal" class="modal hide fade landing-modal" tabindex="-2" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                              <div class="modal-header">
                                  <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                                      ×
                                  </button>
                                  <h3>Login</h3>
                              </div>
                              <div class="modal-body">
                                  <form>
                                      <div class="control-group">
                                          <label for="email">Email Address</label>
                                          <div class="controls">
                                              <input class="input-medium" name="email" type="text"  />
                                          </div>
                                      </div>
                                      <div class="control-group">
                                          <label for="password">Password</label>
                                          <div class="controls">
                                              <input class="input-medium" name="password" type="password" />
                                          </div>
                                      </div>
                                      <div class="control-group">
                                          <label class="checkbox">
                                              <input type="checkbox" value="">
                                              Remember me</label>
                                      </div>
                                      <div class="control-group">
                                          <div class="controls">
                                              <button type="submit" class="button">
                                                  Login
                                              </button>
                                          </div>
                                      </div>
                                  </form>
                              </div>
                          </div>
                  

                  当我尝试将链接添加到 href 时,如下所示

                  When i try to Add the link to the href as follows

                   <a href="login.html" data-toggle="modal" data-target="#login-modal">Login</a>
                  

                  模态窗口中的链接页面加载!!

                  the Linked Page Loads in the Modal Window!!

                  推荐答案

                  查看 bootstrap-modal.js 中的第 223 行,发现发生了什么:

                  Looking at line 223 in bootstrap-modal.js revealed what's happening:

                  , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
                  

                  当使用数据 api 时,模式会检查 href 属性是否不是 id 并将其设置为 remote 选项的值.这会导致页面最初加载 data-target 内容,然后在 remote 内容之后加载 href 内容.

                  When using the data api the modal checks if the href attribute is not an id and sets that as the value for the remote option. This causes the page to load the data-target content initially and then load in the href content after as remote content.

                  因此,为避免 href 内容加载到模式中,您需要在链接上指定 data-remote="false":

                  So to avoid the href content getting loaded into the modal you need to specify data-remote="false" on your link:

                  <a href="/some-login-page.html" data-toggle="modal" data-target="#login-modal" data-remote="false">Login</a>
                  

                  这篇关于Twitter BootStrap 模态窗口后备链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  I want to do animation of an object along a particular path(我想沿特定路径对对象进行动画处理)
                  How to show a running progress bar while page is loading(如何在页面加载时显示正在运行的进度条)
                  HTML5 Canvas toDataURL returns blank(HTML5 Canvas toDataURL 返回空白)
                  Canvas has white space at the bottom and scrolls too far(画布底部有空白区域并且滚动太远)
                  HTML5 Canvas Resize (Downscale) Image High Quality?(HTML5 Canvas 调整大小(缩小)图像质量?)
                  Bootstrap 3 / showing modal doesn#39;t work with the javascript way(Bootstrap 3/显示模式不适用于javascript方式)
                      <bdo id='tgYnn'></bdo><ul id='tgYnn'></ul>
                    • <i id='tgYnn'><tr id='tgYnn'><dt id='tgYnn'><q id='tgYnn'><span id='tgYnn'><b id='tgYnn'><form id='tgYnn'><ins id='tgYnn'></ins><ul id='tgYnn'></ul><sub id='tgYnn'></sub></form><legend id='tgYnn'></legend><bdo id='tgYnn'><pre id='tgYnn'><center id='tgYnn'></center></pre></bdo></b><th id='tgYnn'></th></span></q></dt></tr></i><div id='tgYnn'><tfoot id='tgYnn'></tfoot><dl id='tgYnn'><fieldset id='tgYnn'></fieldset></dl></div>
                      • <tfoot id='tgYnn'></tfoot>

                        <small id='tgYnn'></small><noframes id='tgYnn'>

                          <tbody id='tgYnn'></tbody>

                            <legend id='tgYnn'><style id='tgYnn'><dir id='tgYnn'><q id='tgYnn'></q></dir></style></legend>