title: Using Javascript to remove/hide span tags that have a certain class
body: <p>I'm writing some software that compiles HTML fragments and exports them to Microsoft Word. I'd like a script that cycles through the compiled fragments and removes certain tags that have a particular class. </p>
  
  <p>I cannot use CSS as the display:none; style doesn't work on export to Word.</p>
  
  <p>I cannot use a tags id as the fragments may have multiple instances of tags I want to hide.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>&lt;head&gt;
  &lt;script&gt;
      function hideme(){  
          var span = document.getElementById("hideme");
          span.parentNode.removeChild(span);  
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="hideme()"&gt;
      Hello I'd like to remove &lt;span id="hideme" value="1"&gt;THIS&lt;/span&gt; word, which I can&lt;br/&gt;
      I'd also like to remove &lt;span id="hideme" value="1"&gt;THIS&lt;/span&gt; word, which I can't
  &lt;/body&gt;
  </code></pre>