title: How to load multiple xml files?
body: <p>I want to load different XML files on buttons click. How can I send it to the function?</p>
  
  <pre><code>&lt;button onclick = 'loadXMLDoc(a.xml)'&gt;&lt;/button&gt;
  &lt;button onclick = 'loadXMLDoc(b.xml)'&gt;&lt;button&gt;
  &lt;script&gt;
      function loadXMLDoc(a) {
          var xmlhttp = new XMLHttpRequest();
          xmlhttp.onreadystatechange = function() {
              if (this.readyState == 4 &amp;&amp; this.status == 200) {
                  myFunction(this);
              }
          };
          xmlhttp.open("GET", "a", true);
          xmlhttp.send();
      }
  &lt;/script&gt;
  </code></pre>