Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js replace space

// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
 
PREVIOUS NEXT
Tagged: #js #replace #space
ADD COMMENT
Topic
Name
2+8 =