搜索文档
getURLParameters(url?): Record<string, string>
url?
Record
string
获取网址参数
window.location.href
Record<string, string>
返回包含当前URL参数的对象
Throws
当url参数不是字符串时抛出
Example
getURLParameters('http://url.com/page?name=Adam&surname=Smith'); // => {name: 'Adam', surname: 'Smith'} getURLParameters('https://example.com?page=1&size=10'); // => {page: '1', size: '10'}