<input> accept Attribute in Microsoft Edge

我只是一个虾纸丫 提交于 2019-12-30 05:32:10

问题


Anyone know how to get accept working in Edge?

<input type="file" accept=".csv">

Works fine in Chrome 44, Firefox 39, IE 11, Opera 31.

Also tried

<input type="file" accept=".csv,text/csv">


回答1:


"accept" attributes are definitely not supported in Microsoft Edge at this point. I confirmed your behavior as "no go" in edge, but showing up in IE via the [...] thing in the upper right of Edge.

The Edge status shows it as "Under Consideration" with just 198 votes at https://wpdev.uservoice.com/forums/257854-microsoft-edge-developer/suggestions/13661175-full-spec-support-for-accept-in-input-type-file .

If you're interested in implementation of the HTTP Client Hints (aka "accept") on Edge be sure and vote it up at the URL above.




回答2:


As @mparizeau reported, @JoeHealy's post is talking about HTTP Accept header, which is not what the question is about.

To answer the question: at the moment, Edge does not support accept on <input type="file" />.

There is are plenty of open issues here.



来源:https://stackoverflow.com/questions/31875617/input-accept-attribute-in-microsoft-edge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!