Hi
I am after one of the query string values in the URL using ‘client side’.
I know how to do this with php, but in this case I don’t have access to the server.
http://site.com/?blah=foo&abc=some-value
<?php echo $_GET['abc']; ?>Usage:
Result:
After googling it, and reading several posts, they all seem to be overly complicated… building arrays of key and var. The answers seem to be trying to build the all encompassing universal get all possible params.
I don’t need all possible params, I simply need the value of “abc”.
Is there a simple way of doing this in javascript?
Googling I finally found one that wasn’t trying to be all encompassing.
Does this work?: