SAPO::Utility.Url->getQueryString
This method will return an object with pair key => value of each URL variables. By default it gets query string of current URL. If an url is passed it will get query string of passed URL.
This is static method.
Syntax
SAPO.Utility.Url.getQueryString(<optional string>)
Compatibility
| All browsers | Yes |
Depends
Input Parameters
- <string> (optional)
Sample
http://js.sapo.pt/SAPO/Utility/Url/sample/
Example
alert(SAPO.Utility.Url.getQueryString());
or
alert(SAPO.Utility.Url.getQueryString('http://www.example.com/index.php?var1?value1&var2=value2'));
Last example will return:
{
var1: value1,
var2: value2
}
Community feedback