这篇翻译不完整。请帮忙从英语翻译这篇文章

URLSearchParams.values()方法返回一个iterator,该遍历器允许遍历对象中包含的所有值。这些值都是USVString对象。

注意: 该方法在Web Workers中也可使用

语法

searchParams.values();

返回值

返回一个iterator.

例子

// 创建一个测试用URLSearchParams对象
var searchParams = new URLSearchParams("key1=value1&key2=value2");

// 输出值
for(var value of searchParams.values()) {
  console.log(value);
}

结果如下:

value1
value2

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 49Edge Full support 17Firefox Full support 44IE No support NoOpera Full support 36Safari Full support YesWebView Android Full support 49Chrome Android Full support 49Edge Mobile ? Firefox Android Full support 44Opera Android Full support 36Safari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

另请参考

文档标签和贡献者

此页面的贡献者: Heptagonnnn
最后编辑者: Heptagonnnn,