📅  最后修改于: 2022-03-11 15:03:07.147000             🧑  作者: Mango
document.querySelector('.custom-file-input').addEventListener('change',function(e){
var fileName = document.getElementById("myInput").files[0].name;
var nextSibling = e.target.nextElementSibling
nextSibling.innerText = fileName
})