Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

FormData.values()

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

FormData.values() 方法返回一个允许遍历该对象中所有值的 迭代器 。这些值是 USVString 或是Blob 对象。

注意: 此方法在 Web Workers 中可用

语法

formData.values();

返回值

返回一个迭代器.

示例

//创建一个FormData测试对象
var formData = new FormData();
formData.append('key1', 'value1');
formData.append('key2', 'value2');

//显示值
for (var value of formData.values()) {
   console.log(value); 
}

结果为:

value1
value2

规范

Specification Status Comment
XMLHttpRequest
values() (as iterator<>)
Living Standard Initial definition

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 50.0 44 (44) ? ? ?
Available in web workers 50.0        
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS (Gecko) IE Mobile Opera Mobile Safari Mobile Chrome for Andorid
Basic support 未实现 50.0 44.0 (44) (Yes) ? ? ? 50.0
Available in web workers 未实现 50.0           50.0

 

相关链接

文档标签和贡献者

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