How do you use the search method in javascript in an if statement?
<p>I have an if statement that I want to execute if a certain variable does not have the <code>&lt;br/&gt;</code> element in it. How would you do this?</p>

<p>I tried </p>

<pre><code>var str = "hello&lt;br/&gt;goodbye";
if( str.search("&lt;br/&gt;") == false) {
//execute certain code
}
</code></pre>

<p>but this did not work.</p>
