Retrieve Query String parameters

How can I retrieve query string parameters from my javascript code?

If possible, please provide some sample code.
Who is Participating?
Gurvinder Pal SinghConnect With a Mentor Commented:
If you meant the Current URL query string parameters, then you just have to do

var queryString =;

var keyPairsCombined = queryString.split("&");
var keyPairMap = new Array();

for ( var counter = 0; counter < keyPairsCombined.length; counter++)
   var keyPair = keyPairsCombined[ counter ].split("=");
   keyPairMap[ keyPair[ 0 ] ] = keyPair[ 1 ];

now just mention the name like
leakim971Connect With a Mentor PluritechnicianCommented:
Kiran SonawaneConnect With a Mentor Project LeadCommented:
This link has number of ways to extract the query strings
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.