中的模态正文中未显示引导模态目标内容

Bootstrap modal target content not showing in modal body in

本文关键字:模态 目标 显示 正文      更新时间:2023-09-26

我使用的是jquery 1.8.3和Bootstrap v2.3.2。

问题是来自目标url的内容并没有显示在模型主体中。这在除IE8之外的所有浏览器中都可以正常工作。

下面是我的代码

jquery

   $(document).on('click', '.myModal', function (e) {
        e.preventDefault();
        var target = $(this).attr("href");
        var title = $(this).attr("title");        
        $("#myModal .modal-body").html('Loading ........');
        $("#myModal").modal("show"); 
        $("#myModal .modal-body").load(target, function () {
        });
    });

HTML

<a href='http://test/test.php' class='myModal' title='Car page'>Pop up </a>

只需将此元标记添加到您的头中,然后重试;

<meta http-equiv="X-UA-Compatible" content="IE=8"></meta>

如果不起作用,试试这个;

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />