问题:input file.value(this.value)=c:fakepath/…
解决方案:
window.URL.createObjectURL(this.files[0]);
<img src="" id="img" style="width: 50px; height:50px;">
<input type="file" name="file" onchange="document.getElementById('img').src= window.URL.createObjectURL(this.files[0]);">