Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get url parameters

let url = 'https://www.example.com?name=n1&name=n2';
let params = (new URL(url)).searchParams;
params.get('name') // "n1"
params.getAll('name') // ["n1", "n2"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #url #parameters
ADD COMMENT
Topic
Name
1+1 =