tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.toString

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2025-03-11 20:21:25
URLSearchParams.toString is used to get the string of search parameters that can be directly used in a URL.
toString(): string

Return

Type
Description
string
The string of search parameters.

Samples

Get the string of search parameters:
import url from 'pts/url';

export default function() {
const params = new url.URLSearchParams('key1=value1&key2=value2');

params.set('key3', 'value3');
console.log(params.toString()); // key1=value1&key2=value2&key3=value3
}


Ajuda e Suporte

Esta página foi útil?

comentários