build uriendcode in jquery code example Example: urlencode jquery var encoded = encodeURIComponent(str);