Home  >  Article  >  Web Front-end  >  JavaScript获取Url里的参数_javascript技巧

JavaScript获取Url里的参数_javascript技巧

WBOY
WBOYOriginal
2016-05-16 16:25:491060browse

最近开发的项目需要用JavaScript读取Url字符串里的参数的值

通过查找资料和自己的试验,总算成功

脚本如下:

复制代码 代码如下:


测试:

复制代码 代码如下:

<script><br /> var id=GetRequest("ID") ;<br /> alert(id);<br /> </script>

如果大家还有其它的方法,还请告之,本文持续更新

欢迎共同交流、共同学习~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn