Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (9.5k points)

Can anyone tell me how to retrieve query string values in JavaScript?

1 Answer

0 votes
by (19.7k points)

Try to use URLSearchParams like below:

const urlParams = new URLSearchParams(window.location.search);

const myParam = urlParams.get('myParam');

Interested in Java? Check out this Java Certification by Intellipaat. 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Oct 4, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
asked Jul 13, 2019 in Python by Sammy (47.6k points)

Browse Categories

...