Views: 12.6K
Replies: 1
Archived
|
How to retrieve specific Name/Value pairs from Querystring in Javascript?What is the best way to retrieve specific name/value pairs in Javascript from the Querystring?
For example if the url is "http://www.mycompany.com/customer/orders.aspx?id=1&name=john&address=main" and I need the value for the id say. Ideally I am looking for either a jQuery or else non-library solution (i.e. raw Javascript). Thanks. Bogusław Dobrogost, Apr 12, 2011
|
|
Reply 1Thought of writing this down, but here a great deal of solutions...
http://stackoverflow.com/questions/901115/get-querystring-values-in-javascript Also a jQuery plugin is available for the same. http://plugins.jquery.com/project/query-object It's simple as using below... $.query.get('name'); // The site has the required docs..
Rajesh Pillai, Apr 16, 2011
|