+ 2
how to play music on hover a image ?
i have a task to create the music will be play when i hover a image, please help
1 Antwort
+ 5
var audio = new Audio('audio_file.mp3');
document.querySelector(".img1"). addEventListener ("mouseOver", function() {
audio.play();
});