Posted By

brownrl on 09/23/11


Tagged

get browser String query


Versions (?)

Get Query String Args Javascript


 / Published in: JavaScript
 

URL: http://www.itsgotto.be/cv.php

This will get the arguments on the query string and put them into a handy array.

  1. function getUrlVars()
  2. {
  3. var vars = {};
  4. var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
  5. vars[key] = value;
  6. });
  7. return vars;
  8. }

Report this snippet  

You need to login to post a comment.