Replace specific text in the document with javascript?
<p>I'm having trouble getting this to work...it just replaces the entire page with the result</p>

<pre><code>var str="textiwanttoreplace";
var el = document.getElementById('welcome');
el.innerHTML = str;
var date = new Date();
var hours = date.getHours();


if (hours &gt;= 8 &amp;&amp; hours &lt; 13) {
    el.innerHTML = str.replace("textiwanttoreplace", "It's 8 and 13");
} else if (hours &gt;= 13 &amp;&amp; hours &lt; 18) {
    el.innerHTML = str.replace("textiwanttoreplace", "It's 13 and 18");
} else if (hours &gt; 18 &amp;&amp; hours &lt;= 23) {
    el.innerHTML = str.replace("textiwanttoreplace", "It's 18 and 23");
} else {
    el.innerHTML = str.replace("textiwanttoreplace", "Hello");
}
</code></pre>

<p><strong>edit:</strong> changed, and now I'm not seeing any results am I missing something?</p>
