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
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
1, jquery get the URL is very simple, the code is as followsCopy CodeThe code is as follows:Window.location.href;In fact, it's just a JavaScript-based window object that doesn't have the knowledge of jquery.2, jquery get URL parameters more complex,
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
This article is mainly on the javascript/jquery get address bar URL parameters of the method is introduced, the need for friends can come to the reference, I hope to help you. Using jquery to get URLs and using jquery to get URL parameters is
In web development, many developers prefer to use JavaScript to get the current URL URLs, this article for you to summarize the more commonly used to get the URL of the JavaScript implementation code
The URL is the Uniform Resource Locator (uniform
This article transferred from: http://blog.csdn.net/chendi1985/article/details/5291773Window.location method Get URLUniform Resource Locator (Uniform Resource Locator, URL)The complete URL consists of the following
Turn around.Assuming the current page full address is: Http://www.test.com:80/aaa/bbb.aspx?id=5&name=kelli"/HTTP" is the protocol name"Www.test.com" is the domain name"80" is the port number"AAA" is the station name."Bbb.aspx" is the page name (file
Using jquery to get URLs and using jquery to get URL parameters is the most common operation we need to use.1, jquery get the URL is very simple, the code is as follows1 window.location.href;In fact, it's just a JavaScript-based window object that
If an encoding is required, it indicates that this is not suitable for transmission. There are a variety of reasons, such as a large size that contains private data. For a URL, encoding is required because some characters in the URL may cause
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.