Home >Web Front-end >JS Tutorial >JQuery page address processing plug-in jqURL detailed explanation_jquery

JQuery page address processing plug-in jqURL detailed explanation_jquery

WBOY
WBOYOriginal
2016-05-16 16:01:271073browse

Sometimes we need to process the parameters passed by the page address on the client side. The jqURL plug-in can obtain page parameters and parameter values, obtain the page URL address, and open a new window of a specified size.

How to use:

Suppose the current url address is: "http://www.jb51.net?a=1&b=2&c=3"

Method 1: Open a new page window

Copy code The code is as follows:

A new 200x200 google.com window will be opened.

Method 2: Get the current page URL address

$.jqURL.url(); 

Return results: http://www.jb51.net?a=1&b=2&c=3

Method 3: Get the parameters passed by the current page URL address

$.jqURL.qs(); 

Return result: a=1&b=2&c=3

Method 4: Get the address of the page after removing parameters

$.jqURL.strip(); 

Return results: http://www.jb51.net

Method 5: Get the value of parameter a passed by the page URL

$.jqURL.get("a"); 

Return result: 1

Method 5 has a small disadvantage, there is no way to get the parameter A=1

The above is the entire content of this article, I hope you all like it.

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