Possible Duplicate:
obtaining querystring from current url in javascript?
I was to get everything after the question mark in the url. Ive seen a way to do it that does not require a function but cannot find it for the life of me.
url
fsdhfbsdfj/index.html?hello
get
hello
Use
If you want to get rid of the starting "?", use
The properties of the location object are described here.
Your title says "get querystring", but your question says "get everything after the question mark" which is something different and can include both a querystring and a hash.
I assume that when you say "the" url you are talking about the current Web page.
To get the querystring:
To get everything after the first ?:
You can find the query string in
window.location.search