Created
May 9, 2012 19:03
-
-
Save yahelc/2648038 to your computer and use it in GitHub Desktop.
redirect url js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var get = (function() { | |
var map = {}; | |
location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, k, v) { | |
map[k] = v; | |
}); | |
return map; | |
} ()); | |
$("input[name='redirect_url']").val(get.redirect_url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what are m,k,v?