Posted By

nalmeida on 03/10/10


Tagged

javascript


Versions (?)

getQuerystring


 / Published in: JavaScript
 

Function to get querystring parameters

  1. function getQuerystring(value, source){
  2. var _source = source || document.location.search;
  3. var _match = _source.match(new RegExp(value+'=(.+?)(?:$|&|#)'));
  4. return (_match && _match.length && _match[1] != null) ? _match[1] : null;
  5. }

Report this snippet  

You need to login to post a comment.