post url encoded jquery code example Example: urlencode jquery var encoded = encodeURIComponent(str);