如何在html页面中静音背景音乐
根据客户的要求,我在网页中添加了背景音乐。我已将音乐设置为循环模式以连续播放。我用过
有人知道如何提供静音背景声音的按钮吗?
感谢您分享您的时间。
As per clients requirement, i have added a background music to webpage. I have set the music in loop mode to play it continuous. I have used <BGSOUND> tag to play the audio. The problem here is how to implement mute button so that client can mute the playing sound. I know nowadays its a bad idea to play automatic background music, but its the clients requirement. The page is simple static html.
Do anybody have the idea how to provide button to mute background sound?
Thanks for sharing your time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保您的 BGSOUND 设置了 id 属性,那么它应该像设置一样简单
将 src 属性设置为空白:
Make sure your BGSOUND has it's id attribute set, then it should be as simple as setting
the src attribute to blank :