If you have a URL with some GET parameters as follows:
and need to get the values of each parameters then below is a nifty piece of code solving your requirement.
You could access
location.search, which would give you from the
? character on to the end of the URL or the start of the fragment identifier (#foo), whichever comes first.
You can then access