Immediate play sound on button click in HTML page

后端 未结 5 1119
旧巷少年郎
旧巷少年郎 2021-02-02 17:42

In my HTML page I have 9 images for dialing numbers and one text box that shows the pressed numbers. I want each of those images to immediately play beep sound when users click

5条回答
  •  执念已碎
    2021-02-02 18:27

    This code lets you put in a picture button; when click you get a sound. It works with Google Chrome and Microsoft Edge but I can't get it to work in Internet Explorer. I'm using html 5 codes; please copy and paste and add you own samples.

    
    
     
    
    
    

    more on codes look at http://html5doctor.com/html5-audio-the-state-of-play/

提交回复
热议问题