简体   繁体   English

当我尝试追加时,FormData 不起作用

[英]FormData doesn`t work when I try to append

In Google Chorome's DevTool I try to do that:在 Google Chorome 的 DevTool 中,我尝试这样做:

var fd = new FormData();
fd.append('newField', 'someValue');

but fd still is empty.但 fd 仍然是空的。 Any Idea?任何的想法?

fd.get('newField');

The above will return 'someValue' .以上将返回'someValue'

You should note that it is supported on Chrome v50 and firefox v39.您应该注意到它在 Chrome v50 和 firefox v39 上受支持。 See here for support.请参阅此处以获取支持。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM