title: How do i make a modal that can be opened with different trigger buttons using JS
body: <p>This is my first time asking a question in here, so I'm sorry if I do this wrong ...
  I'm an intern at a web-shop here in Denmark, where I have been appointed to updating their website. Their current website does NOT use bootstrap, so therefore I cannot use bootstrap answers. Likewise am I not familiar with jQuery, so I would prefer if the answer is usable with JavaScript only. :)</p>
  
  <p>My question is, how do I make a modal that can be triggered from a variety of different buttons?</p>
  
  <p>I've figured out how to make a modal that can be opened with one or two trigger buttons - thanks to another thread in here, the script code for that looks like this:</p>
  
  <pre><code>&lt;script&gt;
      //Get the modal
      var prismodal = document.getElementById('prisMatchModal');
  
      //Get the button that opens the modal
      var prisBtn = document.getElementsByClassName("prisMatchBtn")[0];
      var prisBtn2 = document.getElementsByClassName("prisMatchBtn")[1];
  
      //Get the &lt;span&gt; element that closes the modal
      var prisClose = document.getElementsByClassName("prisClose")[0];
  
      //When the user clicks the button, open the modal
      prisBtn.onclick = function() {
          prismodal.style.display = "block";
      }
  
      prisBtn2.onclick = function() {
          prismodal.style.display = "block";
      }
  
      //When the user clicks on &lt;span&gt; (x), close the modal
      prisClose.onclick = function() {
          prismodal.style.display = "none";
      }
  
      //When the user clicks anywhere outside the modal, close it
      window.onclick = function(event) {
          if (event.target == prismodal) {
              prismodal.style.display = "none";
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>And this works perfectly as I want it to, but how do I rewrite this, so that no matter how many different trigger buttons there are - and which one of these you press, the modal will open?</p>