Home  >  Article  >  Web Front-end  >  JavaScript gets the parameters in Url_javascript skills

JavaScript gets the parameters in Url_javascript skills

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

A recently developed project requires using JavaScript to read the value of parameters in the Url string

Through searching for information and my own experiments, I finally succeeded

The script is as follows:

Copy code The code is as follows:



Test:

Copy code The code is as follows:
<script><br>       var id=GetRequest("ID") ;<br> ​​ alert(id);<br> </script>

If you have other methods, please let us know and this article will continue to be updated

Welcome to communicate and learn together~

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