title: Javascript - check if div contains a word?
body: <p>How can I check if a div contains a certain word?</p>
  
  <pre><code>var divs= document.getElementsByTagName('div');
  for (var i = 0, len = divs.length; i &lt; len; ++i) {
  
      if (divs[i].text = '*word*'){
      //do somthing
  }
  }
  </code></pre>
  
  <p>doesn't work.</p>