Javascript get url Query Params

Date: 2018-02-06
        function getQueryParams() {
            var qs = document.location.search;
            qs = qs.split('+').join(' ');
            var params = {},
                tokens,
                re = /[?&]?([^=]+)=([^&]*)/g;
            while (tokens = re.exec(qs)) {
                params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
            }
            return params;
        }

 

10120cookie-checkJavascript get url Query Params