title: How to set an .ajax() responseText to a variable
body: <p>My question is how can I get the HTML of one page and store it in an object that I can later search through with jQuery methods to get elements by id, name,class, etc.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>   $(document).ready(function(){
       $('#button').click(function() {
          var page = $.ajax({
                  type: 'GET',
                  url: 'Grabber.php',
                  data: {url:$('#url')},
                  dataType: "HTML",
                  success: function(data){
                      alert(data); //this alert displays the correct information
                  } 
                      }).responseText;
          alert(page); //this alert displays nothing
       });
    });  
  </code></pre>
  
  <p>How can i get that "page" variable to work? And even better, how can I store it so I can access it as if it were an HTML document. My only idea so far is as a DOM document. </p>