replace space with dash javascript
<pre><code>var html = "&lt;div&gt;"+title+"&lt;br/&gt;";
document.write(title.replace(/ /g,"-"));
html+= '&lt;p&gt;&lt;a href="go.aspx?title=' + title + '"&gt;Details&lt;\/a&gt;&lt;/p&gt;&lt;/div&gt;';
</code></pre>

<p>hi all,i want to replace <strong>title</strong> space with dash</p>
