See also: buildQueryString

Parses a query string into attribute/value pairs.

Syntax

JSV_parseQueryString(expQ)

Prototype

expQ.parseQueryString()

Returns

n/a

Parameters

The parseQueryString function uses the following arguments.

Argument Description
expQ The query string (e.g., ?ABC=123&L=Page1) that is to be parsed.

Remarks

The JSV_parseQueryString parses the attribute/value pairs into the qsArray object array. Each element of the array is an object with the attribute (e.g., qsArray[0].attribute) and its corresponding value (e.g., qsArray[0].value).

The JSV_parseQueryString is used in many of the other utility functions and can be used to create other functions.

Dependencies

JSV_isWhitespace

Example

The following lines of code

var qs = "?ABC=123&L=Page1&Music=R%26B";
JSV_parseQueryString(qs);
JSV_writeQueryArray();

produce