s

javascript get query string parameter edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 03 February 2021 | 1870

In modern browsers, it easy to get query string parameters

Solution

let params = (new URL(document.location)).searchParams;
let name = params.get("name");