Getting a specific URL parameter in jQuery

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

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *