是否IE10支持FORMDATA()?FORMDATA

2023-09-11 01:02:15 作者:網瘾мī妹ざ

我读过(这里)这IE10支持FORMDATA()。但是,当我键入此到IE10的JavaScript控制台:

I've read (here) that IE10 supports FormData(). But when I type this into the IE10 JavaScript console:

foo = new FormData();

我得到的错误,FORMDATA没有定义

I get the error, "FormData not defined"

是否IE10支持FORMDATA()或不是吗?有没有窍门能让它在IE10工作?

Does IE10 support FormData() or doesn't it? Is there a trick to getting it to work in IE10?

推荐答案

我可以证实它 - 本网页上运行的code。在控制台正常工作

I can confirm that it does - running your code in the console on this page works fine.

我会因此假设你在怪癖模式,因此,浏览器是pretending它不知道它是与上述模式。

I will therefore hypothesize that you are in Quirks Mode, and therefore the browser is pretending it doesn't know it to be compatible with said Mode.

请确保您的网页有一个有效的<!DOCTYPE HTML> 开始,且没有错误回落到怪癖模式

Make sure your page has a valid <!DOCTYPE html> at the start and no errors to fall back into quirks mode.