Search

You searched for in
There was one result.

Getting values from the query string using JavaScript (November 13, 2010 3:59 PM)

Getting values from the query string using JavaScript is not very straight forward. It is very easy for server-side code, however, JavaScript doesn't have any built-in methods to access these values easily. We can however access the query string as a string using the search attribute of the location object. Querystrings come in the format "?varname1=varvalue1&varname2=varvalue2&varname3=varvalue3". To convert this into a useable format, we will first remove the "?", then we will split the name/value pairs and ...