1. <legend id='IsfPi'><style id='IsfPi'><dir id='IsfPi'><q id='IsfPi'></q></dir></style></legend>

    1. <small id='IsfPi'></small><noframes id='IsfPi'>

      <tfoot id='IsfPi'></tfoot>

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

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

      Bootstrap 3/显示模式不适用于javascript方式

      时间:2023-06-21
      1. <tfoot id='P4a3I'></tfoot>
          • <legend id='P4a3I'><style id='P4a3I'><dir id='P4a3I'><q id='P4a3I'></q></dir></style></legend>
            • <bdo id='P4a3I'></bdo><ul id='P4a3I'></ul>
                <tbody id='P4a3I'></tbody>

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

                本文介绍了Bootstrap 3/显示模式不适用于javascript方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我使用 Bootstrap 3.0 中的 Modal 功能.

                I use the Modal feature from Bootstrap 3.0.

                我有这个代码:

                <a data-toggle="modal" href="/myNestedContent" data-target="#myModal">
                  Open the modal containing the content
                </a>
                
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                //nested content will be inserted here
                </div>
                

                当我点击锚点(链接)时,整个作品 => 我看到了带有内容的模式.

                When I click on the anchor (the link), the whole works => I see the modal with the content.

                但是,当我使用 Javascript 方式(而不是链接)来显示这样的模式时:

                However, when I use the Javascript way (instead of the link) to show the modal like this:

                $('#myModal').modal('show'); 
                

                我只看到淡入淡出效果,没有显示模态...

                I only see the fade effect without the modal being shown...

                当我开始点击链接时,然后调用 javascript,它就可以工作了.(副作用?)

                当我通过javascript方式启动时,即使链接只显示淡入淡出效果而没有模态.

                可能是.. modal Javascript 方法的错误?

                Might it be .. a bug from the modal Javascript method?

                有关信息,我使用的脚本的声明顺序正确:

                For information, the declarations of my scripts that I use are in the right order:

                <script src="//code.jquery.com/jquery.js"></script>
                <script src="javascripts/jquery.form.min.js"></script> 
                <script src="javascripts/bootstrap.min.js"></script>
                

                推荐答案

                我不确定我是否误解了你的问题.

                i am not sure if i have misunderstood your question.

                根据我对你问题的理解,你需要

                According to my understanding of your question, you need

                $('#myModal').modal({
                    show: true,
                    remote: '/myNestedContent'
                });
                

                你不能只是

                $('#myModal').modal('show'); 
                

                因为这个js方法中没有提供url.

                because there is no url provided in this js method.

                这能解决你的问题吗?

                这篇关于Bootstrap 3/显示模式不适用于javascript方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在引导程序中动态调整模态对话框的大小 下一篇:为什么 JS 模态消息框会在 setTimeout() 上暂停倒计时?

                相关文章

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

                    <legend id='2lmMi'><style id='2lmMi'><dir id='2lmMi'><q id='2lmMi'></q></dir></style></legend><tfoot id='2lmMi'></tfoot>

                    <small id='2lmMi'></small><noframes id='2lmMi'>

                    • <bdo id='2lmMi'></bdo><ul id='2lmMi'></ul>