Replacing + with a space

I'm trying to set text in a div according to variables in the URL set via GET. I can only do it this way as this is for a JavaScript assignment so no servers around. As URLs tend to do, spaces in a string have been replaced by a

+

.

str.replace("+"," ")

does absolutely nothing. I found some other links on this site that use a simple