I want to substitute a variable including " " with "%20" so I can use it in a link. How do I do that with a JS-function?
And my result should beCode:function subs(){
var strName= "This is the test";
}
"This%20ís%20the%20test"
Printable View
I want to substitute a variable including " " with "%20" so I can use it in a link. How do I do that with a JS-function?
And my result should beCode:function subs(){
var strName= "This is the test";
}
"This%20ís%20the%20test"
try this perhaps
http://summerholiday.org/freecode/Ja...RL_Encode.html