2022-05-25 分類: 網站建設
<script language="javascript" type="text/javascript"> function playSound(soundfile) { document.getElementById("dummy").innerHTML= "<embed src=\"" +soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />"; } </script>
<span id="dummy"></span>
<a href="#"onclick="playSound('UrlToSoundFile');">Click here to hear a sound</a> <ponmouseover="playSound('UrlToSoundFile');">Mouse over this text to hear a sound</p>
<!doctype html> <html> <head> <meta charset="ISO-8859-1" /> <title>Example of How to Play a Sound on Click or on MouseOver</title><script language="javascript" type="text/javascript"> function playSound(soundfile) { document.getElementById("dummy").innerHTML= "<embed src=\""+soundfile+"\" hidden=\"true\" autostart=\"true\" loop=\"false\" />"; } </script> </head> <body><span id="dummy"></span> <p><a href="#"onclick="playSound('zbluejay.wav');">Click here to hear a bird sing</a></p> <ponmouseover="playSound('zbluejay.wav');">Or you can put your mouse over this paragraph to hear the same bird sound.</p> </body> </html>
新聞標題:網站建設技術應用如何在鼠標觸發時給網頁添加聲音
網頁路徑:http://m.newbst.com/news1/158701.html
網站建設、網絡推廣公司-創新互聯,是專注品牌與效果的網站制作,網絡營銷seo公司;服務項目有網站建設等
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯
猜你還喜歡下面的內容