get querystring using jquery

You can easily get query string values using jquery.
Code
  $.urlParam = function(name){
        var results = new RegExp('[\\?&]' + name + 
                     '=([^&#]*)').exec(window.location.href); 
             if (!results) { return 0; } 
            return results[1] || 0;
       } 
      var yourQstring = $.urlParam('querystringname');
      //$.urlParam() is array of query string

Leave a Reply

Your email address will not be published. Required fields are marked *