title: javascript - replace text with tags
body: <p>i do not know much about javascript searched long, but didn't get the reslut i need.</p>
  
  <p>i want to replace  on page load  this </p>
  
  <pre><code>&lt;p&gt;---SOMERANDOMTEXT:::&lt;/p&gt;
  </code></pre>
  
  <p>with </p>
  
  <pre><code>&lt;strong&gt;SOMERANDOMTEXT&lt;/strong&gt;
  </code></pre>
  
  <p>played with this an many other snippets.. </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      window.onload = function() {
          function myscript() {
              input = '---';
              output='New Text';
              document.body.innerHTML = document.body.innerHTML.replace(input,output);
          }
      }
  &lt;/script&gt;
  </code></pre>