87,921
社区成员
发帖
与我相关
我的任务
分享
<html>
<body>
<input id=b type=file webkitdirectory>
<script type="text/javascript" charset="UTF-8">
document.querySelector('#b').addEventListener('change', e => {
for (let entry of e.target.files)
console.log(entry.name, entry.webkitRelativePath);
});
</script>
</body>
</html>
Chrome浏览器使用上面的代码