javascript get query string parameter Edit

Murugan Andezuthu Dharmaratnam | 03 February 2021 | 84

In modern browsers, it easy to get query string parameters

Solution

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