如何在javascript中为消息通知添加嘟嘟声?
添加了显示消息通知的示例。无论何时显示,都必须添加蜂鸣音。它几乎模仿桌面警报这样的行为 任何人都能找到解决方案吗?这应该会有帮助如何在javascript中为消息通知添加嘟嘟声?,javascript,jquery,asp.net,notifications,beep,Javascript,Jquery,Asp.net,Notifications,Beep,添加了显示消息通知的示例。无论何时显示,都必须添加蜂鸣音。它几乎模仿桌面警报这样的行为 任何人都能找到解决方案吗?这应该会有帮助 <script> function PlaySound(soundObj) { var sound = document.getElementById(soundObj); sound.Play(); } </script> <embed src="success.wav" autosta
<script>
function PlaySound(soundObj) {
var sound = document.getElementById(soundObj);
sound.Play();
}
</script>
<embed src="success.wav" autostart="false" width="0" height="0" id="sound1" enablejavascript="true">
功能播放声音(soundObj){
var sound=document.getElementById(soundObj);
声音。播放();
}
谢谢您的快速回复。怎么可能是“soundObj”?它是语音文件还是将使用客户端系统文件?您已经添加了声音文件并将该声音用作蜂鸣音。它支持哪些语音文件扩展名?请参阅此处更新的答案: