certainlyakey
7/29/2014 - 5:58 AM

Get URL parameter with Javascript

Get URL parameter with Javascript

function getURLParameter(name) {
		return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null;
}