input file 類型為excel表格


以下為react寫法,可自行改為html的

<div className="flag-tip">
                            請上傳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, type)} accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
                        </form>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM