Skip to content

Instantly share code, notes, and snippets.

View AnatoliyAkhmatov's full-sized avatar
♣️

Anatoliy AnatoliyAkhmatov

♣️
View GitHub Profile
@Robert-96
Robert-96 / README.md
Last active February 13, 2024 15:24
Get URL Parameters with JavaScript

Get URL Parameters with JavaScript

URL Parameters (Query Parameters) are a set o key value pars attached to the end of a url. They are used to send small amounts of data from page to page, or from client to server via a URL.

TL;DR

const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);