Get query string parameter using JavaScript

Following code will help in fetching the value of a query string parameter.


If URL is http://server/page.html?id=1

Then usage would be GetQueryStringParameters(“id”) which would return 1

Decoding Query String with Unicode Characters

Recently I came across an issue where the query string had unicode characters and ASP.NET’s “HttpUtility.UrlDecode” was not properly converting the characters. After searching few minutes came across the following solution posted by cjsharp1 at Stackoverflow.