JavaScript window.location.search 02

In the previous sample we learnt the JavaScript code for window location search property that returns the QueryString parameters from the current URL of the web browser. In this sample we will learn how to get the QueryString variables and their values separately. We have used JavaScript Substring Function, Split function and an Array collection to store the variable names and values.

Try the sample code below to learn the advanced JavaScript logic to extract the QueryString parameters from the URL:

Edit this code and click update to view output
OUTPUT:
  • HIRE EzineASP.Net Developers