开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜