/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function urlencode( str ) { var ret = str; ret = ret.toString(); ret = encodeURIComponent(ret); ret = ret.replace(/%20/g, '+'); return ret; }