I need the whole parameter list as such , not one by one
var Url = "http://localhost/Home/Admin?param1=1¶m2=2$param3=3";
I want to get the whole parameter list from the url.
var params = "param1=1¶m2=2¶m3=3";
Arun Prasad E SArun Prasad E S
asked Jul 25, 2016 at 7:26
2 Answers 2
var Url = "http://localhost/Home/Admin?param1=1¶m2=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,9374 gold badges25 silver badges44 bronze badges
Comments
Thanks for the support, I use this one for my need
var params = window.location.href.split('?')[1];
answered Jul 25, 2016 at 7:52
Comments
Explore related questions
See similar questions with these tags.
lang-js
Url.split('?')[1]
orUrl.slice(Url.lastIndexOf('?') + 1)
var params = Url.split('?')[1];