javascript replace() is not replacing all the characters match
I want to turn /Admin/ListOfMovies into _Admin_ListOfMovies using replace().
var $id = id.replace('/', '_');
It looks like it only replacing the first /. How do I replace all of them?
Thanks for helping.
No comments:
Post a Comment