In javascript, what is the easiest way to get a parameter from the url?


Isn't there a simple way to get a parameter from the url within javascript?  For example, is there a way to get the value of param1 from

Thanks in advance
Who is Participating?
RobOwner (Aidellio)Commented:
no you need to parse it yourself ( or use one of the many functions find online.
RobOwner (Aidellio)Commented: shows how to retrieve the querystring.

you could use this plugin https://github.sindresorhus/query-string

they all essentially use regular expressions to extract the key value pairs into an object
tmitch1968Author Commented:
Awesome - thanks!
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.