clear & file input & reset & file input
clear & file input & reset & file input
Clear <input type="file">
document.getElementById("uploadCaptureInputFile").value = "";
input.replaceWith(input.val('').clone(true));
https://css-tricks.com/snippets/jquery/clear-a-file-input/
https://www.sitepoint.com/community/t/clear-input-type-file/257508
https://stackoverflow.com/questions/20549241/how-to-reset-input-type-file
https://www.myguysolutions.com/2010/04/21/clear-upload-file-input-field-using-javascripts-innerhtml/
https://stackoverflow.com/questions/1043957/clearing-input-type-file-using-jquery
html input accept attribute
https://www.w3schools.com/TAGS/att_input_accept.asp
https://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful
https://exceptionshub.com/html-inputfile-accept-attribute-file-type-csv.html
// application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (.XLSX) & Excel Files 2007+ (.xlsx)
// application/vnd.ms-excel (.XLS) & Excel Files 97-2003 (.xls)
// CSV files (.csv)
<input id="fileSelect" type="file" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
https://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10470423.html
未经授权禁止转载,违者必究!