Posted By

sircambridge on 10/27/08


Tagged

javascriptgupurlparam


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

indamix


javascript get url parameter gup


 / Published in: Other
 

  1. var gup = function( name ) {
  2. var results = (new RegExp("[\\?&]"+name+"=([^&#]*)")).exec(window.location.href);
  3. if ( results == null ) {return ""}
  4. else {return results[1]}
  5. };

Report this snippet  

You need to login to post a comment.