tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.delete

PDF
Focus Mode
Font Size
Last updated: 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
}


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback