javascript get value from get url

//url example https://example.com/page?action=nexttoresult
var url_string = location.href; 
var url = new URL(url_string);
var action = url.searchParams.get("action");
console.log(action);


Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe to get the latest posts sent to your email.



Leave a Reply

Discover more from Soa Technology | Aditya Website Development Designing Company

Subscribe now to keep reading and get access to the full archive.

Continue reading