<input type="file" name="myfile"> <img src="" alt="" id="img"> 方式一:使用window.createObjectURL let input =document.getElementsByName