Custom 1-button player with HTML5 audio tag

后端 未结 1 402
逝去的感伤
逝去的感伤 2021-02-08 19:11

Working with the tag in some web development I\'ve been doing lately, and one thing I\'m trying to do is use it to build a word list and provide a pro

1条回答
  •  无人共我
    2021-02-08 19:52

    It's fairly simple. You just need to call the play method on the audio DOM object when something is clicked. The something could be an image, text, link, or whatever suits.

    Here's one possible way:

    
    

    See an example

    0 讨论(0)
提交回复
热议问题