Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

play sound with keydown javascript

document.addEventListener('keydown', function(e) {
  if (e.keyCode == 65) {
    document.getElementById('audio').play();
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #play #sound #keydown #javascript
ADD COMMENT
Topic
Name
6+3 =