title: XmlHttpRequest.responseText result?
body: <p>I am new to JavaScript. I need to test the output of <code>XMLHttpRequest.responseText</code> on a given URL. What is the simplest way to do it?</p>
  
  <pre><code>var url = "http://m.google.com/"; &lt;br&gt;
  var xmlHttp = new XMLHttpRequest(); &lt;br&gt;
  xmlHttp.open('GET', url, true); &lt;br&gt;
  document.getElementById('main-content').innerHTML = xmlHttp.responseText; &lt;br&gt;
  </code></pre>
  
  <p><code>main-content</code> is a <code>&lt;div&gt;</code> tag. The last line of code will replace the contents of the <code>&lt;div&gt;</code> tag with output of <code>xmlHttp.responseText</code>.</p>
  
  <p>Now, when I open <code>m.google.com</code> in my regular browse and select "View Source", what part of the source gets placed within the <code>&lt;div&gt;</code> tag. Or let's stay I have to test this code in - where do I write this code? </p>
  
  <p>Actually, I have an Android app that displays this HTML code result in a <code>WebView</code>. </p>