Skip to content

Commit 91915e9

Browse files
committed
预加载
1 parent 841802c commit 91915e9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Task44/Task44.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ <h3>播放列表</h3>
7171
</div>
7272
</div>
7373
<!-- 插入音频 ---->
74-
<audio id="song" >
74+
<audio id="song" preload="auto" >
7575
<!---<source src="test/不老梦.mp3" type="audio/mpeg" >---->
7676
</audio>
7777
<script src="Task44.js"></script>

Task44/Task44.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ function dolist(){
4848
li.innerHTML="<input type='radio' name='op' id='"+i+"'><label for='"+i+"'>"+data[i].song+"</label><span>"+data[i].author+"</span>";
4949
songlist.getElementsByTagName("ul")[0].appendChild(li);
5050
//生成音轨
51-
/*var source=document.createElement("source");
51+
var source=document.createElement("source");
5252
source.src=data[i].address;
53-
song.appendChild(source);*/
53+
song.appendChild(source);
5454
}
5555
}
5656
/*****同步歌曲和封面*****/

0 commit comments

Comments
 (0)