Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery parse url parameters

var getUrlParameter = function getUrlParameter(sParam) {
    var sPageURL = window.location.search.substring(1),
        sURLVariables = sPageURL.split('&'),
        sParameterName,
        i;

    for (i = 0; i < sURLVariables.length; i++) {
        sParameterName = sURLVariables[i].split('=');

        if (sParameterName[0] === sParam) {
            return sParameterName[1] === undefined ? true : decodeURIComponent(sParameterName[1]);
        }
    }
    return false;
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: delete method 
Javascript :: javascript fuzzy search 
Javascript :: rows().remove 
Javascript :: run node script from terminal 
Javascript :: javascript dom after a element 
Javascript :: empty object is falsy 
Javascript :: React Native drawer navigation screen header title and buttons 
Javascript :: call a javascript function at a specific time of day 
Javascript :: get unique id angular 
Javascript :: lowercase 
Javascript :: update an array element with an array in mongoose 
Javascript :: jquery dom traversal parent 
Javascript :: if without else javascript 
Javascript :: connectedcallback web components 
Javascript :: jest write test for function 
Javascript :: nodejs get cpu count 
Javascript :: hide screen links in drawerNavigation in react native 
Javascript :: send response from iframe to parent 
Javascript :: change height of div with scroll in javascript 
Javascript :: document.body.style.background 
Javascript :: JavaScript Destructuring - From ES6 
Javascript :: download file from api response 
Javascript :: formdata upload file 
Javascript :: multiple elements with same id jquery 
Javascript :: javascript symbols 
Javascript :: js immediately invoked function 
Javascript :: clear timeout js 
Javascript :: storybook global decorator 
Javascript :: usecallback in react 
Javascript :: update html text 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =