string para url javascript

encodeURI(string);
Successful Sandpiper