title: How do I get all iframe elements?
body: <p>I'm showing a loading indicator while some external iframes are loaded with the following code:</p>
  
  <pre><code>&lt;html&gt;
  
      &lt;head&gt;
          &lt;title&gt;Loading iframe&lt;/title&gt;
      &lt;/head&gt;
  
      &lt;script&gt;
  
  
      function loading_iframe(){
          document.getElementById('loading_iframe').style.display = "none";
          document.getElementById('loading').style.display = "";
          document.getElementById('loading_iframe').onload = function(){
              document.getElementById('loading').style.display = "none";
              document.getElementById('loading_iframe').style.display = "";
          }
      }
      &lt;/script&gt;
  
      &lt;body&gt;
          &lt;iframe id="loading_iframe" src="iframe.html" width="800" height="100"&gt;&lt;/iframe&gt;
          &lt;div id="loading"&gt;Loading...&lt;/div&gt;
  
  
          &lt;script&gt;
              loading_iframe();
          &lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Problem is I'm running around 50 mini iframes per page and I don't fancy rewriting the code above to match each iframe id.</p>
  
  <p>Is there a way I could match each iframe id with a regex, for example:</p>
  
  <ul>
  <li>loading_iframe1 </li>
  <li>loading_iframe2 </li>
  <li>loading_iframe3</li>
  </ul>