Possible Duplicate:
Get query string values in JavaScript
If one submits a GET form, the resulting address will look like www.example.com/stuff?param1=stuff¶m2=morestuff
. I know how to read/set the value of a form field on a page, but how do I read submissions from the previous page (in the URL) with JavaScript? I guess I could take the url and split()
it, to get the parameters, but is there any quicker/simpler way to read param1 (just an example)?
Note: this is not a duplicate of this, since that question is about how to do it in PHP.