How to get URL Parameters using JavaScript

preview_player
Показать описание
Here in this video I will show you, how to get url parameter value in javascript

Need to access URL GET parameters with JavaScript? If yes, this is the tutorial for you. I cover how to retrieve the values of any URL parameter, aka URL variable, with only a few lines of code.

The very convenient URLSearchParams object within JavaScript lets you easily work with query strings - it provides methods to add, remove and retrieve key value pairs and most importantly, extract an encoded query string for further use.

This object is a relief for traditional JavaScript developers who know the pain of using regular expressions to extract query string data or manual string construction to create a query string. URLSearchParams does all this for you through its very helpful methods.
Рекомендации по теме
Комментарии
Автор

thanks but how call this value in href direct ?

musddiqahmad