Edit in JSRUN

var button=document.querySelector("# muou");
var file=document.querySelector("# file");
button.addEventListener('click',function(e){
  console.log("click");
  file.click();  
})
function convert2DataUrl(fs){
  var strHtml='',
      strData='';
  for(let file of fs){
    var reader= new FileReader();
    reader.readAsDataURL(file);
    reader.onload=function(e){
      strHtml += `<tr>
									<td><span><img src=${e.target.result} width='20px'></span></td>
      						<td><textarea>${e.target.result}</textarea></td>
									</tr>`;
      document.querySelector('#show').innerHTML=strHtml;
      document.querySelector('#showStr').innerHTML=strData;
    }
  }
}
<h1>图片转dataURl生成器</h1>
<h3>支持多张图片,图片最好控制在10-20kB之内</h3>
<input type='file' id='upLoad' style="display:none" onChange='convert2DataUrl(this.files)'
       multiple='true'/>
<div id="muou">打开</div>
<table id='show'></table>
div{
  width:80px;
  height:80px;
  background:#6f8;
  text-align:center;
  vertical-align:middle;
  line-height:80px;
  border-radius:20%;
}