title: How to search for string in html files using Javascript?
body: <p>I have 5 html files and I have a search form that I would like to use to search for text in these html files .</p>
  
  <pre><code>&lt;form&gt;
     &lt;input type ='text' /&gt;
     &lt;input type ='submit' /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I have an idea of using xmlhttprequest to get the files </p>
  
  <pre><code>var xhr = new XMLHttpRequest();
  xhr.open("GET", "file1.html", false);
  xhr.send();
  var guid = xhr.responseText;
  
  var xhr = new XMLHttpRequest();
  xhr.open("GET", "file2.html", false);
  xhr.send();
  var guid = xhr.responseText;
  
  ...
  </code></pre>
  
  <p>then search for text in these files but I don't know how to search in the files using javascript.</p>
  
  <p>How to search the files after getting it using xmlhttprequest ? Or Is there is another way to do the search using javascript ?  </p>