tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.delete

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2025-03-11 20:21:24
URLSearchParams.delete is used to delete the specified key and its corresponding value from the search parameter list.
delete(key: string): void

Parameters

Parameter
Type
Description
key
string
Key.

Return

Type
Description
void
No data returned.

Samples

Delete the specified key and its corresponding value from the search parameter list:
import url from 'pts/url';

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

params.delete('key2');
console.log(params.toString()); // key1=value1
}


Ajuda e Suporte

Esta página foi útil?

comentários