Skip to main content

Posts

Showing posts from July, 2011

Access Query string in javascript

Many time we need to access query string through javascript for a specific task but there is no built in funciton of javascript to access querystring.

You have to make your own function just read current url string by window.location.href property of javascript, split this urlstring by the char '?' and '&', enumerate this array of string and further split by the char '=' then the first value must be the key and second one is the value of that key.