Geeks With Blogs
Daily dotnet {notes on codes}

Here is the function

 function getQuerystring(key, default_) {
                if (default_ == null) default_ = "";
                key = key.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
                var regex = new RegExp("[\\?&]" + key + "=([^&#]*)");
                var qs = regex.exec(window.location.href);
                if (qs == null)
                    return default_;
                else
                    return qs[1];
            }

*taken from http://www.bloggingdeveloper.com/post/JavaScript-QueryString-ParseGet-QueryString-with-Client-Side-JavaScript.aspx

Posted on Friday, July 9, 2010 1:48 PM Javascript | Back to top


Comments on this post: Get Querystrings using javascript

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Prasenjit | Powered by: GeeksWithBlogs.net