 <p>You can use replace() to do what yo want it to. Use it in this format</p> <pre><code>value = value.replace(" ", ","); //First param is the char you want to replace; The second is the one you want to replace the first param with </code></pre>