Monday, December 13, 2021

Get Query Params

window.location object has a bunch of utility methods and properties. We can get information about the protocol, host, port, domain, etc from the browser URLs using these properties and methods. 


var args = window.location.search
let data = new URLSearchParams(location.search).get('reqId');
console.log(data)

No comments:

Post a Comment

Your feedback is always appreciated. I will try to reply to your queries as soon as time allows.Please don't spam,spam comments will be deleted upon reviews.