I've been trying to incorporate sound into my website using this code. Strangely, the sounds only seem to play in Adobe Dreamweaver and not in any browsers. Any advice would be greatly appreciated! :)
var audio1 = new Audio('sound1.mp3');
var audio2 = new Audio('sound2.mp3');
var audio3 = new Audio('sound3.mp3');
var audio4 = new Audio('sound4.mp3');
function sound1()
{
audio1.play();
}
function sound2()
{
audio2.play();
}
function sound3()
{
audio3.play();
}
function sound4()
{
audio4.play();
}