title: How to clear tags from a string with JavaScript
body: <pre><code>&lt;div id="mydiv"&gt;
      &lt;p&gt;
          &lt;b&gt;&lt;a href="mypage.html"&gt;This is an example&lt;a&gt;.&lt;/b&gt;
          &lt;br&gt;
          This is another example.
      &lt;/p&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      var mystr = document.getElementById('mydiv').innerHTML;
      .....
  &lt;/script&gt;
  </code></pre>
  
  <p>I want to clear all tags, and get the salt text,</p>
  
  <pre><code>mystr = "This is an example this is another example.";
  </code></pre>
  
  <p>How can I do that?</p>