I want to display multiple alert box as well as an audio alert when some value is violating. And also need an option to close that audio alert . I have done like this
if( ($mark<=$minValue) || ($mark>= $maxValue))
{
echo " <script> var audio = document.createElement('audio');
document.body.appendChild(audio);
audio.src = '/sounds-990-system-fault.mp3';
setInterval(function(){audio.play();}, 5000);
alert('Average student');
</script>";
}
But here I got alert box first and after pressing OK audio is come.I need audio come along with the alert box.And How can I close that audio alert ?