0

I want to fetch URL parameters using jquery and store data in variables

parameters in URL : http://localhost:50636/Detail.html?teh=167&vill=BA0976DD-5997-DC11-93FA-000E0CA4A31A&khasra=53%2F%2F22

i want to store like :

var teh = 167; (get from url)
var vill = BA0976DD-5997-DC11-93FA-000E0CA4A31A; (get from url)
var khasra = 53//22(get from url and %2F change to /)

please help how to do this using jquery

  • jQuery is a framework primarily for updating the DOM, it is not the tool to do what you need here, which is probably why any research you've done hasn't worked. You need to use plain JS and its string manipulation methods to read the URL and process the querystring. See the duplicate for more information. – Rory McCrossan Jul 20 '21 at 07:46

0 Answers0