arun prasad arun prasad - 4 months ago 6
Javascript Question

Get the url Parameter string from Javascript

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";

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