You can use window.location.search . Here is a quick function that will return the parameters as an object:
function getParameters() { var parameters = {}; var splitStr = window.location.search.substring(1).split(/[&=]/); var i, key, value; for(i = 0; typeof (key = splitStr[i], value = splitStr[i + 1]) !== 'undefined'); i += 2) { parameters[decodeURIComponent(key)] = decodeURIComponent(value); } return parameters; }
source share