0

How to get ID Parameter in my url

https://example.com/?id=8281

how to get id= value in html

GET ID IN URL

also anyone tell for applications

Msk Dev
  • 3
  • 2
  • Cant get url in html. You have to use some script. Please check this answer https://stackoverflow.com/questions/979975/how-to-get-the-value-from-the-get-parameters – Chilarai Mar 13 '21 at 17:34
  • You should try yourself and when you faced problem share it here and the community is ready to help. – Masood Mar 14 '21 at 12:02

1 Answers1

1

What you are looking for is called a query parameter, you can get it with plain javascript like this.

const urlParams = new URLSearchParams(window.location.search);
const myParam = urlParams.get('myParam');

reference -> How can I get query string values in JavaScript?

john mason
  • 159
  • 2
  • 5