Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在iframe中使用引导模式调用页面?_Javascript_Jquery_Twitter Bootstrap_Iframe_Bootstrap Modal - Fatal编程技术网

Javascript 在iframe中使用引导模式调用页面?

Javascript 在iframe中使用引导模式调用页面?,javascript,jquery,twitter-bootstrap,iframe,bootstrap-modal,Javascript,Jquery,Twitter Bootstrap,Iframe,Bootstrap Modal,我使用Bootsrap模式插件并调用其中的一些页面。当页面需要回发或重定向时,它不会在模式中发生,而是会更改页面。所以我想让它在iframe中显示页面,这是boostrap模式 这是我的模态函数。密码我应该如何修改它以在iframe中显示内容 $.fn.modal.defaults.spinner = $.fn.modalmanager.defaults.spinner = '<div class="loading-spinner" style="width: 200px; m

我使用Bootsrap模式插件并调用其中的一些页面。当页面需要回发或重定向时,它不会在模式中发生,而是会更改页面。所以我想让它在iframe中显示页面,这是boostrap模式

这是我的模态函数。密码我应该如何修改它以在iframe中显示内容

$.fn.modal.defaults.spinner = $.fn.modalmanager.defaults.spinner =
      '<div class="loading-spinner" style="width: 200px; margin-left: -100px;">' +
        '<div class="progress progress-striped active">' +
          '<div class="progress-bar" style="width: 100%;"></div>' +
        '</div>' +
      '</div>';

    $.fn.modalmanager.defaults.resize = true;

    var $modal = $('#ajax-modal');

    $('.modal-edit').on('click', function () {
        // create the backdrop and wait for next modal to be triggered
        $('body').modalmanager('loading');

        var edit = $(this).attr("data-id");
        setTimeout(function () {
        $modal.load('User.aspx?edit=' + edit + '', '', function () {
            $modal.modal();
        });
        }, 100);
    });
这是我的模态div:

  <div id="ajax-modal" class="modal fade" tabindex="-1" data-width="760" data-replace="true">
  </div>
试试这个

    $('.modal-edit').on('click', function () {
            // create the backdrop and wait for next modal to be triggered
            $('body').modalmanager('loading');
            var edit = $(this).attr("data-id");
            setTimeout(function () {
                $modal.on('show', function () {
                    $('iframe').attr("src", 'Customer_User.aspx?edit=' + edit + '');
                });
                $modal.modal()
                //$modal.load('Customer_User.aspx?edit=' + edit + '', '', function () {
                //    $modal.modal();
                //});
            }, 100);
        });


<div id="ajax-modal" class="modal fade" tabindex="-1" data-width="760" >
                        <iframe ></iframe>
                    </div>