Please use the below code to fix it in IE
var content = $('#content');
$('#open').on('click', function () {
var win = window.open("", "", "width=400, height=200");
$newWindow = $(win.document.body);
$newWindow.html(document.getElementById("content").innerHTML);
$newWindow.find('#close').on('click', function () {
win.close();
});
});
var content = $('#content');
// and then
$newWindow.html(content);
document.ready
状态。JavaScript不会等待先前语法的完成。 - user1467267