Search This Blog

Friday, 10 March 2017

JavaScript::Get URL Parameter

Get URL Parameter
function getUrlParam(name) {
    var results = new RegExp('[\\?&]' + name + '=([^&#]*)').exec(window.location.href);
    return (results && results[1]) || undefined;

}

No comments:

Post a Comment