// to get the query strings from the current url use window.location.search const queryStrings = new URLSearchParams('?browser=chrome&action=redirect'); queryStrings.get('browser'); queryStrings.has('action');
Источник