inputfile类型为excel表格
以下为react写法,可⾃⾏改为html的
<div className="flag-tip">
inputtypefile样式请上传excel表格, 后缀名为.csv, .xls, .xlsx的都可以
</div>
<form action="" method="post" enctype="multipart/form-data" id="uploadForm">
<!--For CSV files (.csv),use: .csv;
For Excel Files 2003-2007 (.xls), use: application/vnd.ms-excel;
For Excel Files 2010 (.xlsx), use: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
-->
<input id="fileSelect" className="file" type="file" name="upload" onChange={self.submitFile.bind(self, ty
pe)} accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" / </form>
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论