我正在使用 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" />
关于javascript - Bootstrap 模态目标内容未显示在模态主体中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33388812/