SyntaxFix
Write A Post
Hire A Developer
Questions
function getURLParameter(name) { return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search) || [null, ''])[1].replace(/\+/g, '%20')) || null; }
So you can use:
myvar = getURLParameter('myvar');