getQueryVariable( variable ) method

This function looks in the query string on the URL for the value corresponding to the given name.

Syntax

<static> getQueryVariable( variable ) → {string}

Parameters

Name Type Description
variable string The name of the variable in the URL to retrieve the value for.

Returns

The value corresponding to the given name.

Type:

string

Example

// Get the pageToShow variable from the URL query string
var pageToShow = hwc.getQueryVariable( "pageToShow" );

Source

hwc-comms.js, line 301.