tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.keys

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2025-03-11 20:21:25
URLSearchParams.keys is used to get all key names in the search parameter.
keys(): string[]

Return

Type
Description
string[]
All key names in the search parameter.

Samples

Get all key names for the specified search parameter:
import url from 'pts/url';

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

console.log(params.keys()); // key1,key2
}


Ajuda e Suporte

Esta página foi útil?

comentários