<script> var audio = new Audio('1.mp3'); window.onbeforeunload = function() { audio.play(); return "подождите"; } </script>