我正在尝试使用jQuery AJAX请求重新加载整个页面(向加载提供简单的GET参数),大致以这种方式.
$.ajax({
url: "site.php?param="+new_param,
cache: false,
success: function(content) {
$("html").html(content);
}
});
Run Code Online (Sandbox Code Playgroud)
正如你所看到的,这将级联<html>块,并以某种方式破坏样式(背景突然变白等等).
这样的技巧$(document).html(content);也无济于事.
不幸的是,我还没有找到解决这个问题的方法.提前致谢.