- URL provided in the playSound function can be changed to give the custom sound url.
- Style property is not the part of implementation. It is used to provide a nice interface for viewers.
Example: This example generating the sound after clicking the button.
- button tag vs input type="button" attribute
- How to make a Bootstrap 4 accordion collapse when clicking the whole header div ?
- How to avoid dropdown menu to close menu items on clicking inside ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.