URL

Read GET parameters from URL.

Functions

Util.getVar

Definition

Name
Util.getVar
Shorthand
u.getVar
Syntax
String = Util.getVar( String param [, String url ] );

Description

Read GET parameter from url - making GET parameters easily available for JavaScript

Reads parameter from location.search as default, but can also take specific url parameter, if you want to read param from other url-string.

Parameters

param
String parameter to find in URL
url
String Optional url - default location.search.

Return values

String value of param, or empty string if not found.

Examples

none

Dependencies

JavaScript
  • RegExp
  • String.match
Manipulator

none

Files

Main file

  • u-url.js

Segment support files

  • none

Segment dependencies

desktop_edge
u-url.js
desktop_ie11
u-url.js
desktop
u-url.js
desktop_ie10
u-url.js
desktop_ie9
u-url.js
desktop_light
u-url.js
tablet
u-url.js
tablet_light
u-url.js
smartphone
u-url.js
mobile
not tested
mobile_light
not tested
tv
u-url.js
seo
not supported