 <p>first, look at this: <a href="http://www.w3schools.com/jsref/jsref_replace.asp" rel="nofollow">http://www.w3schools.com/jsref/jsref_replace.asp</a> and then do not use stackoverflow for questions of this kind</p>