Discover javascript get url parameter, include the articles, news, trends, analysis and practical advice about javascript get url parameter on alibabacloud.com
Using jquery to get URLs and using jquery to get URL parameters is an operation we often use
1, jquery get URL is very simple, the code is as follows
Window.location.href;
Actually just use JavaScript to base the Window object, and
Using jquery to get URLs and using jquery to get URL parameters is an operation we often use
1, jquery get URL is very simple, the code is as follows
Copy Code code as follows:
Window.location.href;
Actually just use
Using jquery to get URLs and using jquery to get URL parameters is the operation we often use, the following text description and code analysis of the form for everyone to analyze, please see below for details.
1, jquery get URL is very simple, the
URL is: Uniform Resource Locator (uniform Resource Locator, URL)The complete URL is composed of these parts:Scheme://host:port/path?query#fragmentScheme: Communication protocolCommonly used Http,ftp,maito, etc.
Http://localhost/test/test.htm?id=1
No nonsense, directly affixed to the code, through the example of a description of JS according to the key value of the URL to get the parameter value and the URL of the parameters to convert to JSON object, example two to get URL pass parameters,
When processing Javascript on the frontend only, you may encounter the problem of passing a webpage parameter to the next page through the get method. in this case, you can use js to obtain the get parameter in the url of the current page. the core
This article mainly introduces how to obtain url parameters through js analysis url? In the previous section, # And later sections, you can check the code. The main idea is to parse url parameters into js objects, it is convenient to add, delete,
[story caused by failure] Processing with a plus sign in the URLSource: http://agapple.iteye.com/blog/773061
HTML javaScript HTTP protocol
Cause of the problem:URL parameters, because this way the arguments are visible
The difference between get and post:There are 5 differences between get and post methods in form submission.1.get is the data that is fetched from the server, and post is the data sent to the server.2.get is to add the parameter data queue to the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.