to replace globally in javascript with replace function : <p>I want to replace some texts in javascript.
But it is working only one time.</p>

<pre><code>  passageText = passageText.replace('&lt;/span&gt;&lt;span alignmentBaseline="useDominantBaseline"', '&lt;/span&gt;&lt;br&gt;&lt;span alignmentBaseline="useDominantBaseline"');
</code></pre>
