更改所有HTML代码

I use JQuery AJAX. I need to send some data to page, than receive data, remove all tag (include html), and set new page like this:

<html>
<head></head>
<body>Example</body>
</head>

I use this JQuery script:

 $.ajax({
  type: "POST",
  url: "some.php",
  data: "name=John",
  success: function(msg){
    //how remove and set new page?
  }
 });
$.ajax({
  type: "POST",
  url: "some.php",
  data: "name=John",
  success: function(msg){
    window.location = 'your/new/page/url';
  }
 });