Answers for "reading data from link in javascript"

0

reading data from link in javascript

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"]
Posted by: Guest on June-16-2021
0

reading data from link in javascript

# running on https://www.example.com?name=n1&name=n2
let params = new URLSearchParams(location.search);
params.get('name') # => "n1"
params.getAll('name') # => ["n1", "n2"]
Posted by: Guest on October-10-2021

Code answers related to "reading data from link in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language