<html>
<head>
<title>get parameters and make them JS variables</title>
<script>
var paramKeys = new Array();
var paramValues = new Array();
function getParams()
{
var text = location.href
var hasParams = (text.indexOf("?" != -1)
var params = (hasParams) ? unescape(text.substring(text.indexOf('?')+1, text.length-1)) : "" ;
var couples = params.split("&"
for (var idx = 0; idx < couples.length; idx++)
{
var couple = couples[idx].split("="
paramKeys.push(couple[0]);
paramValues.push(couple[1]);
}
}
</script>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.