0
您好我目前正在嘗試使一個圖像按鈕(的揚聲器)爲我播放一個音頻文件。創建一個圖像按鈕,創建一個聲音的HTML
<p><br></p>
<table>
<tbody><tr>
<th> Quick Clicks </th>
<td style="text-align: center;">
<a href="#3" onclick=""><img src="https://zingtree-uploads.s3.amazonaws.com/images/59777e50293d71.47898028-416750-speaker.png" style="width: 145px; height: 145px;"></a>
</td>
<td style="text-align: center;">
<a href="#3" onclick="do_button_click(14, 7, 'Quick Clicks',0);"><img src="https://zingtree-uploads.s3.amazonaws.com/images/59777e50293d71.47898028-486417-Quick+Clicks.png" style="width: 145px; height: 145px;" ></a>
</td>
</tr>
</tbody></table>
這些都是兩張照片,我想用我想提出的第一個按鈕播放音頻文件:
<a class="btn btn-lg btn-zingtree btn-block btn-primary" onclick="this.firstChild.play()"><audio src="https://thorswrench-my.sharepoint.com/personal/christiaan_karsavior_com/Documents/database%20media/sounds/dead%20battery%20clicking.mp3"></audio>Play</a>`enter code here`
對不起,我知道必須有一個解決方案這個地方,但我沒有找到一個。