相关疑难解决方法(0)

<input type ="file">按扩展名限制可选文件

有人如何通过扩展名限制输入type ="file"元素可以选择的文件?

我已经知道了accept属性,但是在chrome中它确实通过最后定义的MIME类型限制文件(在本例中为"gif"),FF4甚至不限制任何内容.

<input type="file" accept="image/jpg, image/gif">
Run Code Online (Sandbox Code Playgroud)

我做错了吗?或者还有其他方式吗?

你的任何建议......

html input-type-file

70
推荐指数
3
解决办法
12万
查看次数

标签 统计

html ×1

input-type-file ×1