这是工作在windows,但在ubunthu,它只接受pdf文件">
我只需要接受使用输入类型文件的pdf和doc文件。
<input type="file" id="test" name="test" accept="application/msword,text/plain, application/pdf"/>
这是工作在windows,但在ubunthu,它只接受pdf文件
发布于 2015-07-13 10:05:01
将您的代码更改为:
<input type="file" id="test" name="test" accept=".pdf,.doc"/>
扩展名应以点"."
开头,并以逗号","
分隔
发布于 2018-08-12 11:35:55
您可以尝试accept attribute来执行此任务。示例:- <input type="file" id="example" name="test" accept=".pdf,.docx"/>
就像它一样简单。
https://stackoverflow.com/questions/31380367
复制相似问题