Posted By

goo on 01/21/13


Tagged

String parameter query


Versions (?)

[JAVASCRIPT] Get Parameter from url query string


 / Published in: JavaScript
 

URL: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values

Get Parameter from url query string

  1. function getParameterByName(name) {
  2. var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
  3. return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
  4. }
  5. getParameterByName( "parameterName" )

Report this snippet  

You need to login to post a comment.