Java Scripts 網頁音樂影片
1.今天請先去你的雲端硬碟下載你上次上傳的網頁
2.用DW開啟index.html
3.加入下方的語法
4.存檔後再上傳到雲端硬碟
Music
Music
<script type="text/javascript">
var snd = new Audio("bell.wav");
snd.loop = true; //設定循環播放
//停止
function myStop(){
snd.pause();
snd.currentTime = 0;
}
</script>
<input type="button" value="播放" onclick="snd.play()">
<br>
<input type="button" value="暫停" onclick="snd.pause()">
<br>
<input type="button" value="停止" onclick="myStop()">
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
<audio src="horse.ogg" controls>
</audio>
Movie
Movie
<video width="400" controls>
<source src="mov_bbb.mp4" type="video/mp4">
<source src="mov_bbb.ogg" type="video/ogg">
Your browser does not support HTML5 video.
</video>
youtube
youtube
請上傳你網站的QRcode https://forms.gle/TSLoasLdVzK1NXvs8