javascript get url parameter gup


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



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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.