tencent cloud

Tencent Cloud Observability Platform

URLSearchParams.keys

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


Help and Support

Was this page helpful?

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

Feedback