xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

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/1548194/how-to-get-the-htmls-input-element-of-file-type-to-only-accept-pdf-files

https://stackoverflow.com/questions/181214/file-input-accept-attribute-is-it-useful

posted @ 2019-03-04 14:19  xgqfrms  阅读(291)  评论(1编辑  收藏  举报