0

I need the whole parameter list as such , not one by one

var Url = "http://localhost/Home/Admin?param1=1&param2=2$param3=3";

I want to get the whole parameter list from the url.

var params = "param1=1&param2=2&param3=3";
Arun Prasad E S
  • 9,489
  • 8
  • 74
  • 87

2 Answers2

2
var Url = "http://localhost/Home/Admin?param1=1&param2=2$param3=3";
var urlArray = url.split("?");
var params=urlArray[1];

You can see Using split() example of Mozilla Developer Network for more insight on using the split function.

cdaiga
  • 4,861
  • 3
  • 22
  • 42
Ray
  • 280
  • 3
  • 4
0

Thanks for the support, I use this one for my need

var params = window.location.href.split('?')[1];
Arun Prasad E S
  • 9,489
  • 8
  • 74
  • 87