0
我目前在此鏈接上使用onclick = playsound代碼(http://webdesign.about.com/od/sound/a/play_sound_oncl.htm)與一些風格的單選按鈕可以讓一些音頻文件被切換。使用多個音頻文件與onclick = playSound命令支持跨瀏覽器
唯一的問題是,我無法弄清楚如何使用此方法獲得跨瀏覽器支持。
有沒有辦法做到這一點?
<div class="tabs" id="play-bar">
<div class="tab">
<input type="radio" id="tab-1" name="tab-group-1" checked onclick="playSound('soundfile1.wav');">
<label for="tab-1">1</label>
</div>
<div class="tab">
<input type="radio" id="tab-2" name="tab-group-1" onclick="playSound('soundfile2.wav');">
<label for="tab-2">2</label>
</div></div>