Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

play sound with keydown javascript

document.addEventListener('keydown', function(e) {
  if (e.keyCode == 65) {
    document.getElementById('audio').play();
  }
});
Comment

play sound with keydown javascript

<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>
Comment

PREVIOUS NEXT
Code Example
Javascript :: remove duplicates from array of objects 
Javascript :: or operator in javascript 
Javascript :: js how to round up 2 decimal places 
Javascript :: convert a string to object javascript 
Javascript :: jq each loop 
Javascript :: strict mode in javascript 
Javascript :: jquery nice select 
Javascript :: execute php 
Javascript :: copying object javascript 
Javascript :: (Unauthorized) not authorized on admin to execute command 
Javascript :: Bots member count discord js 
Javascript :: javascript convert file to array 
Javascript :: ctx.fillstyle 
Javascript :: How To Open Phone Dialer and Make Call From React Native App 
Javascript :: i18n vue cli 
Javascript :: javascript highlight words 
Javascript :: joi unique validation 
Javascript :: javascript object to array 
Javascript :: node.js util module 
Javascript :: what is the use of bind method in javascript 
Javascript :: laravel http send data json raw 
Javascript :: javascript change color every second 
Javascript :: convert currency to string javascript 
Javascript :: jquery detect textarea change 
Javascript :: selector id jquery but is variable 
Javascript :: nodejs for windows 7 
Javascript :: sort array object 
Javascript :: discord token 
Javascript :: uppercase javascript using function 
Javascript :: how to use the replace method in javascript 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =