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>
新闻标题:网站建设技术应用如何在鼠标触发时给网页添加声音
网页路径:/news1/158701.html
网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有网站建设等
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联
猜你还喜欢下面的内容