Answers for "jquery get search parameter"

0

jquery get search parameter

$.urlParam = function (name) {
    var results = new RegExp('[\?&]' + name + '=([^&#]*)')
                      .exec(window.location.search);

    return (results !== null) ? results[1] || 0 : false;
}

console.log($.urlParam('action')); //edit
Posted by: Guest on December-12-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language