Welcome! Log In Create A New Profile

Advanced

play sound in webdev

Posted by wduser 
play sound in webdev
October 10, 2019 12:50PM
Hi
I would like to play a sound when someone does somthing

I Made this javascript witch normaly works ( outside of webdev)

JS-Code:

function playsound(soundbeep){
var sound = document.getElementByID(soundbeep)
sound.Play()
}

playsound("beep-07.mp3")

Question . How do I add the sound as a resource ?


Thanks
Re: play sound in webdev
October 11, 2019 12:17PM
Specify path mp3

playsound ("...path / biep-07.mp3")

[infosonline.net]



Edited 1 time(s). Last edit at 10/11/2019 12:18PM by infos.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: