The Art of Programming

Get Parameter From Url with Javascript

23. October 2013 08:11 by Scott in javascript  //  Tags:   //   Comments (0)
function getParameterByName(name){
var match = (RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}