play sound with keydown javascript
document.addEventListener('keydown', function(e) {
if (e.keyCode == 65) {
document.getElementById('audio').play();
}
});<audio id="audio" controls style="display:none">
<source src="http://butlerccwebdev.net/support/html5-video/media/soundfile.mp3" type="audio/mpeg"> Your browser does not support the audio element.
</audio>
Also in JavaScript:
- javascript get dictionary values
- javascript objet keys comparaison
- les fonctions reguliere javascript
- nodemon : The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + nodemon index
- javascript substring vs substr
- Updating Object Properties
- get a user input react
- array con tridimensional javascript
- how to check if a number is even or odd in javascript
- integer to array javascript
- javascript clone array of objects
- submit form jquery browser check
- js Bitwise Operators
- node red reverse proxy for ui to root
- jquery parse html
- set padding jquery
- mongoose reference another model
- three.js renderer background color
- how to get textedit on mac without download
- javascript get last url segment
- change array index position in javascript by up and down click
- jquery dialog button text set by variable
- retour a la ligne <p> react
- add in to array mongoose