-1
我的代碼:https://jsfiddle.net/5bj8suxj/我試圖讓暫停和播放按鈕的工作交替
有人可以幫助我。播放按鈕有效,但暫停不起作用。你按播放它的作品,但按暫停沒有效果。
<div style="display:block; cursor: pointer; width: 50px; height:50px; background-color:#00ffff;">
<button style="cursor: pointer; font-family:Tahoma; font-weight: bold;font-size:14px; background-color:#00ffff;color:blue;padding: 0px 0px 0px 0px;"
onclick="document.getElementById('player').play()">Play</button>
</div></div>
<div id="myObj5h" style="display: none;">
<div style="display:block;width: 50px; height:50px; background-color:orange;">
<button style="cursor: pointer; font-family:Tahoma; font-weight: bold;font-size:14px; background-color:orange;color:blue;padding: 0px 0px 0px 0px;"
onclick="document.getElementById('player').Pause()">Pause</button>
<audio id="player" style="display:none;">
<source src='http://hi5.1980s.fm/;' type='audio/mpeg'/>
</audio>
</div></div>
將'Pause()'改爲'pause()'... – makshh