values()
方法在
URLsearchParams
interface returns an
iterator
allowing iteration through all values contained in this object. The values are
USVString
对象。
searchParams.values();
None.
返回
iterator
.
// Create a test URLSearchParams object
var searchParams = new URLSearchParams("key1=value1&key2=value2");
// Display the values
for(var value of searchParams.values()) {
console.log(value);
}
The result is:
value1 value2
| 规范 | 状态 | 注释 |
|---|---|---|
|
URL
The definition of 'values() (see "iterable")' in that specification. |
实时标准 | 初始定义。 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
值
|
Chrome 49 | Edge 17 | Firefox 44 | IE 不支持 No | Opera 36 | Safari Yes | WebView Android 49 | Chrome Android 49 | Firefox Android 44 | Opera Android 36 | Safari iOS Yes | Samsung Internet Android 5.0 |
完整支持
不支持
URL
接口。
URLSearchParams