Posted By


kmallea on 11/05/10

Tagged


Statistics


Viewed 75 times
Favorited by 0 user(s)

getQueryStringByParam


/ Published in: JavaScript
Save to your folder(s)

Get a value from a query string by supplying the parameter


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.