JQuery page address processing plug in jqURL details
- 2020-06-03 05:51:44
- OfStack
Sometimes we need to process the parameters passed by the page address on the client side. The jqURL plug-in can get the page parameters and parameter values, get the page URL address, and open a new window of specified size.
Usage Description:
Assuming that the current url address is: "https: / / www. ofstack. com & # 63; a = 1
&
b=2
&
c=3"
Method 1: Open a new page window
$.jqURL.loc("https://www.ofstack.com",{w:200,h:200,wintype:"_blank"});
A new ES28en.com window of 200x200 will be opened.
Method 2: Get the current page URL address
$.jqURL.url();
Return results: https: / / www ofstack. com & # 63; 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 the parameters
$.jqURL.strip();
Return results: https: / / www ofstack. com
Method 5: Get the value of the parameter a passed on the page URL
$.jqURL.get("a");
Return result: 1
Method 5 has a small drawback: there is no way to get the argument A=1
This is the end of this article, I hope you enjoy it.