Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery read query string

// Read a page's GET URL variables and return them as an associative array.
function getUrlVars()
{
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
        hash = hashes[i].split('=');
        vars.push(hash[0]);
        vars[hash[0]] = hash[1];
    }
    return vars;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: json.stringify parameters 
Javascript :: object in array javascript 
Javascript :: sum of digits in a whole number javascript 
Javascript :: vue on click router push not working 
Javascript :: Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". 
Javascript :: bignumber to number javascript 
Javascript :: getusermedia example 
Javascript :: sequelize not equal 
Javascript :: javascript count table rows 
Javascript :: tofixed currency in js 
Javascript :: javascript create an array of range between two numbers 
Javascript :: js form serialize 
Javascript :: How to calc() height in react native for styling 
Javascript :: how to remove an element from a parent element javascript 
Javascript :: react native datepicker disable future dates 
Javascript :: get page link angular 
Javascript :: jsconfig.json 
Javascript :: remove first row from table jquery 
Javascript :: compose es6 
Javascript :: linear gradient reactjs 
Javascript :: angular load json file with httpclient 
Javascript :: detect emoji in string javascript 
Javascript :: get value json python 
Javascript :: javascript append item to array 
Javascript :: javascripte list length 
Javascript :: jsx foreach 
Javascript :: add key vakue to front of object 
Javascript :: divide first name and last name in javascript 
Javascript :: how to use static files in express with ejs 
Javascript :: javascript get nth element of array 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =