Reading query from javascript - how ?
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
Hi, What is the command in javascript that reads the QueryString (alternative to Request.QueryString["SomeQuery"]) ? Thanks
Hi there, From what I know there's no buit-in funtion/method in javascript to get the value of a key in the querystring. However, you can write some code to do that by yourself, to get information about the current url, you simply use the
window.location
property.var url = window.location.href;
Now you can parse the url to get the query string and the value of an item in the query string.