In the case of known URL parameters, we can use $_get to obtain the corresponding parameter information ($_get[' name ') according to our own situation; how do I get the parameter information on the URL in an unknown situation?
The first, using
If the Address bar URL is: abc.html?m=tomms&c=allsearchlist&pageno=1&pagenum=20&text=11Note: When the URL is in Chinese, the Chinese parameters will be garbled!One way to get URL parameters with JavaScript
1. Open Web page with parametersResponse.Redirect ("form2.aspx?id=url1&name=ok");which The parameters are followed.2. Get the URL
Command
Results
Request.Url.Query
? id=url1&name=ok
1, Request.getrequesturl ()The full URL is returned, including the HTTP protocol, port number, servlet name, and mapping path, but it does not contain the request parameters.2, Request.getrequesturi ()I get a partial value of the request URL, and
Developing an external service class that does not rely on service builder in Liferay7 is very concise and requires only 2 points of annotation:
Defined in the front of the class:
@ApplicationPath ("/pathxxx")
Method before
Https://www.cnblogs.com/Arison/p/5286368.htmlFor such a URLCode to copy code as followsHttp://www.php230.com:80/fisker/post/0703/window.location.html?ver=1.0&id=6#imhereWe can use JavaScript to get every part of it.1, Window.location.hrefThe entire
This article introduces the solution to Chinese garbled characters in jsp get Url requests. If you need it, refer to it.
In jsp, post requests are generally not garbled. If the request is garbled, add the following sentence:
Solution 1
The function description is as follows:Code
// Get Params form URL dml@2012.10.31function getrequest () {var url = location. Search; // get URL in "? "Var therequest = new object (); If (URL. indexof ("? ")! =-1) {var STR = URL. substr (1); STRs =
Tokyu "Want to get URL variable with GET, but server prompt domain name is not real, can't access, what should I do?"
http://iqs.ctgu.edu.cn/lost/register.php&action=activation&auth=688fCtlTO5JS+kJAa/Z8vEK+6bOwGjdDci/ Vsmbqfvtdrrlp5orskzlklqprt8h/dg
//get Address bar parameters //call the current URL address when the URL is empty //the calling method is var params = Getpatams (); functiongetparams (URL) {varTherequest =NewObject (); if(!URL) URL=Location.href; if(Url.indexof ("?")!==-1)
In the absence of the use of Webpack+vue router development, want to get the Rul pass the parameter address, directly through a function can be obtained.For example, in a www.test.com/test.html?sign=test address, to get the value of sign, the usual
1. Open/include/arc.archives.class.php, find $this->prenext[' pre ')//approx. 813 linesInsert on its next line:$this->prenext[' preurl ') = "$mlink"; Previous link Address$this->prenext[' prename ') = "{$preRow [' title ']}"; Previous post title2.
Get current:var url = window.location.href;Baidu as an example:var url=window.location.href;console.info (URL); http://www.jspp.cn/testbin/apptest/app-site/explore.html;The split () method is used to split a string into an array of strings.First use
1 functionGetquerystringargs () {2 vararr = location.search?location.search.substring (1): ";//Get the argument string and remove the question mark at the beginning3 varobj = {};4 if(arr) {5 varARR2 = Arr.split (' & ')); Get each
First Take "http://www.cnblogs.com/wuxibolgs329/p/6188619.html#flag?test=12345" as an example, and then get the various components of it.
1, get the complete URL of the page
var a=location.href;
Console.log (a);
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.