文件上传input type=“file“之accept接受的类型汇总

编程入门 行业动态 更新时间:2024-10-10 12:26:18

<a href=https://www.elefans.com/category/jswz/34/1770535.html style=文件上传input type=“file“之accept接受的类型汇总"/>

文件上传input type=“file“之accept接受的类型汇总

 <input>标签

规定了用户可以在其中输入数据的输入字段。 <input> 元素在 <form> 元素中使用,用来声明允许用户输入数据的 input 控件。 输入字段可通过多种方式改变,取决于 type 属性。

<input> type 属性

type 属性规定要显示的 <input> 元素的类型。

<input> accept 属性

accept 属性规定了可通过文件上传提交的服务器接受的文件类型。

注意:accept 属性仅适用于 <input type="file">

提示:请不要将该属性作为您的验证工具。应该在服务器上对文件上传进行验证。

<input type="file" @change="getVod($event)" accept="audio/mp4, video/mp4">

类型:

.3gppaudio/3gpp, video/3gpp
.ac3audio/ac3
.asfallpication/vnd.ms-asf
.auaudio/basic
.csstext/css
.csvtext/csv
.docapplication/msword
.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotapplication/msword
.dotxapplication/vnd.openxmlformats-officedocument.wordprocessingml.template
.docmapplication/vnd.ms-word.document.macroEnabled.12
.dotmapplication/vnd.ms-word.template.macroEnabled.12
.dtdapplication/xml-dtd
.dwgimage/vnd.dwg
.dxfimage/vnd.dxf
.gifimage/gif
.htmtext/html
.htmltext/html
.jp2image/jp2
.jpeimage/jpeg
.jpegimage/jpeg
.jpgimage/jpeg
.jstext/javascript, application/javascript
.jsonapplication/json
.mp2audio/mpeg, video/mpeg
.mp3audio/mpeg
.mp4audio/mp4, video/mp4
.mpegvideo/mpeg
.mpgvideo/mpeg
.mppapplication/vnd.ms-project
.oggapplication/ogg, audio/ogg
.pdfapplication/pdf
.pngimage/png
.potapplication/vnd.ms-powerpoint
.potmapplication/vnd.ms-powerpoint.presentation.macroEnabled.12
.potxapplication/vnd.openxmlformats-officedocument.presentationml.template
.ppsapplication/vnd.ms-powerpoint
.ppsmapplication/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsxapplication/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptapplication/vnd.ms-powerpoint
.pptmapplication/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
.ppaapplication/vnd.ms-powerpoint
.ppamapplication/vnd.ms-powerpoint.addin.macroEnabled.12
.rtfapplication/rtf, text/rtf
.svfimage/vnd.svf
.tifimage/tiff
.tiffimage/tiff
.txttext/plain
.wdbapplication/vnd.ms-works
.wpsapplication/vnd.ms-works
.xhtmlapplication/xhtml+xml
.xlcapplication/vnd.ms-excel
.xlmapplication/vnd.ms-excel
.xlaapplication/vnd.ms-excel
.xlamapplication/vnd.ms-excel.addin.macroEnabled.12
.xlsapplication/vnd.ms-excel
.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xlsmapplication/vnd.ms-excel.sheet.macroEnabled.12
.xlsbapplication/vnd.ms-excel.sheet.binary.macroEnabled.12
.xltapplication/vnd.ms-excel
.xltxapplication/vnd.openxmlformats-officedocument.spreadsheetml.template
.xltmapplication/vnd.ms-excel.template.macroEnabled.12
.xlwapplication/vnd.ms-excel
.xmltext/xml, application/xml
.zipapplication/zipapplication/x-zip-compressed

更多推荐

文件上传input type=“file“之accept接受的类型汇总

本文发布于:2023-11-17 04:43:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639144.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件上传   类型   input   type   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!