Get a URL argument variable with Javascript
How do I get a $_GET[] argument with开发者_运维技巧 JavaScript?
http://www.example.com/?what=this
I want to get the value of "what" ...
You can get the raw string like this:
window.location.search
E.g., http://google.com/?whatIs=up
gives you ?whatIs=up
And then parse through it to get the different values for the different parameters.
精彩评论