title: How to replace all occurrences of a string in a HTML page using Javascript
body: <p>I know this question may be asked before but I did not find the correct answer that works.</p>
  
  <p>I tried this code</p>
  
  <pre><code>$('body *').each(function(k,v){$(v).text($(v).text().replace("Hazem","mizzo"))});
  </code></pre>
  
  <p>but the page crashes, I don't know why.</p>
  
  <p>I'm prefer the code to be in pure javascript not jQuery.
  Thanks.</p>