Get query string value JavaScript
Query string is a one solution to pass the value from one page to another without use session. It is just keys and value pass through url. Suppose the web application want to get the query string value at client side for the validation on the client side. So i use JavaScript to solve this. Here my JavaScript function to return query string...just pass the key for the query string in the function parameter and you will get the value of query string... Lets take a look at the example : The Javascript function querystring(key) { var re = new RegExp('(?:\\?|&)' + key + '=(.*?)(?=&|$)', 'gi'); var r = [], m; while ((m = re.exec(document.location.search)) != null) r.push(m[1]); var stringQuery = r[0]; return stringQuery; } Example <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type=&q