javascriptjquerypercent-encoding

Percent encoding javascript


Is there a javascript function that takes a string and converts it into another string that is percent-encoded? That way something like "This Guy" turns into "This%20Guy".

Thanks


Solution

  • Try encodeURIComponent() or escape()