Friday, May 24, 2013

How To- Get Query String Value using Java Script

Query String Value using Java Script
In web application development, we all are well aware of Query String and Its uses. We can easily retrieve the Query String values from URL on server-side, but sometimes we need to find the Query String values from URL on client-side i.e using Java Script. But in Java Script, there is no standard way or function to get the Query String values from URL. So here I am explaining how can you get the Query String values from URL using Java Script.

In previous posts, I explained Page Scroll to Top with jQuery, Automatically Refresh Page Using Java Script , How to Create a Textarea Character Counter, Animated Sliding Recent Post Widget For Blogger, Change Input to Upper Case using Java Script, Calculate Age from Date of Birth Using Java Script, jQuery .toggleClass() example and some other articles related to jQuery, Java Script etc.

The following Java Script code snippet facilitates you to retrieve the query string key value. You can also pass the default value if the key value is not find. Here is the function-

If You Enjoyed This Post Please Take 5 Seconds To Share It.

^ Scroll to Top hgpromo