replace space with dash javascript

Posted by ruru on Stack Overflow See other posts from Stack Overflow or by ruru
Published on 2010-04-17T05:56:49Z Indexed on 2010/04/17 6:03 UTC
Read the original article Hit count: 226

Filed under:
var html = "<div>"+title+"<br/>";
document.write(title.replace(/ /g,"-"));
html+= '<p><a href="go.aspx?title=' + title + '">Details<\/a></p></div>';

hi all,i want to replace title space with dash

© Stack Overflow or respective owner

Related posts about JavaScript