<!DOCTYPE html>
<html>
<div class = "Top">
<center>
<h1>
Reaper MP3
</h1>
</center>
</div>
<div class = "Middle">
<center>
<input type = "file" webkitdirectory id = "In" oninput = "LoadFiles()" value = "">
<br>
<select id = "Sel" class = "S">
</select>
</center>
</div>
<div class = "Bottom">
<center>
<audio controls src = "" id = "Plyr">
</audio>
</center>
</div>
<style>
.Top {
width: 100%; height: 50px;
background: #FF0000;
}
.Middle {
width: 100%; height: 500px;
background: #990099;
}
.S {
width: 150px; height: 25px;
}
.Bottom {
width: 100%; height: 50px;
background: #FF0000;
}
</style>
<script>
var SelectFolder = document.getElementById("In");
var Player = document.getElementById("Plyr");
var Select = document.getElementById("Sel");
var DefaultFolder = "/This PC/Music";
var NewOption = document.createElement("option");
var Info = document.createTextNode("");
NewOption.appendChild(Info);
Select.appendChild(NewOption);
function LoadFiles() {
}
</script>
</html>
我试图让它到我可以添加选项的位置,以便为文件夹中的每个文件选择。在我的情况下,文件夹的路径是“/ This PC/Music”,然后将它放到音频src =所选文件/选项的位置。有谁知道我该怎么做?为每个文件创建选项