How can I get query string values in JavaScript?

Update: June-2021 For a specific case when you need all query params: Update: Sep-2018 You can use URLSearchParams which is simple and has decent (but not complete) browser support. Original You don’t need jQuery for that purpose. You can use just some pure JavaScript: Usage: NOTE: If a parameter is present several times (?foo=lorem&foo=ipsum), you will get the … Read more