How can we add beep sound for message notification in javascript?
-
14-07-2021 - |
Pergunta
Added sample to show message notification.Whenever we show it we have to add beep sound. Almost it imitates the behavior like desktop alert.
Can anyone have solution ?
Solução
this should help
<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">
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow