Skip to main content
Version: 3.27.2

URLSearchParams()

The URLSearchParams() constructor creates and returns a new URLSearchParams object.

Syntax

new URLSearchParams()
new URLSearchParams(options)

Parameters

  • options optional
    • : One of:
      • A string, which will be parsed from application/x-www-form-urlencoded format. A leading '?' character is ignored.
      • A literal sequence of name-value string pairs, or any object with an iterator that produces a sequence of string pairs.
      • A record of string keys and string values. Note that nesting is not supported.

Return value

A URLSearchParams object instance.