<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input type="file" name="file"  />
	<div ></div>
	<script>  
	var fileDom = document.getElementById("file");
	var infoBoxDom = document.getElementById('info_box');

	fileDom.addEventListener("change", upload, false);  
	function upload(){  
	    var list = this.files;  
	    for( var i = 0 ; i < list.length ; i++ ){  
           infoBoxDom.innerHTML += list[i].name+"<br>";  
	    }  
       	infoBoxDom.innerHTML += list.length+'个文件';
	}
	</script>  
</body>
</html>

  

相关文章:

  • 2021-11-23
  • 2021-11-06
  • 2022-02-07
  • 2021-12-13
  • 2021-08-21
  • 2021-10-15
  • 2022-12-23
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-05-06
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案