【发布时间】:2012-03-31 21:30:41
【问题描述】:
可能重复:
How can I get a specific parameter from location.search?
我有一个类似下面的网址。
http://localhost/xxx.php?tPath=&pid=37
我想得到 pid=37 但它的名字,因为按时 url 就像上面一样,然后当页面刷新时,url 变成如下所示。
http://localhost/xxx.php?tPath=&action=xxx&pid=37&value=13&fname=aaaa&fone=4321122
所以我想得到 pid=37。它可能是一个函数,我将 pid 作为参数传递给它并返回它的值。
我该怎么做?
【问题讨论】:
-
这篇文章的答案可以帮助你。 stackoverflow.com/questions/979975/…
标签: javascript url