html页面的照片回显

document.getElementById("showImg").src = window.URL.createObjectURL(personsFile.files[0]);

  其中showImg是用于回显图片的<img>标签的ID

  personsFile是上传文件的<imput>标签的ID

posted @ 2020-09-15 16:28  xiaoWangxiao  阅读(540)  评论(0编辑  收藏  举报