Posted By

kmallea on 11/05/10


Tagged

querystring param


Versions (?)

getQueryStringByParam


 / Published in: JavaScript
 

Get a value from a query string by supplying the parameter

  1. function getQueryStringByParam(ji) {
  2. hu = window.location.href;
  3. gy = hu.split("?");
  4. for (i=0;i<gy.length;i++) {
  5. ft = gy[i].split("=");
  6. if (ft[0] == ji) {
  7. return ft[1];
  8. }
  9. }
  10. }

Report this snippet  

You need to login to post a comment.