Created
January 3, 2013 19:26
-
-
Save TastyToast/4446264 to your computer and use it in GitHub Desktop.
Get a pram from url
This file contains 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
function getParameterByName(name) { | |
var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); | |
return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); | |
} | |
// Useful for a url like www.iframe.com/93493434?pram_name=2323 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment