funcao com o botao esc do teclado javascript
JavaScript
document.querySelector('body').addEventListener('keydown', function(event) {
var tecla = event.keyCode;
if(tecla == 13) {
// tecla ENTER
} else if(tecla == 27) {
// tecla ESC
} else if(tecla == 37) {
// seta pra ESQUERDA
} else if(tecla == 38) {
// seta pra CIMA
} else if(tecla == 39) {
// seta pra DIREITA
} else if(tecla == 40) {
// seta pra BAIXO
}
});
Also in JavaScript:
- Title
- how to get width of inline elements js
- Category
- JavaScript
- Title
- javascript check null undefined empty
- Category
- JavaScript
- Title
- checking if a character is an alphabet in js
- Category
- JavaScript
- Title
- angular run behind proxy
- Category
- JavaScript
- Title
- how to run p5js in a particular section of page
- Category
- JavaScript
- Title
- how to load localt ext file in js
- Category
- JavaScript
- Title
- delete last element of array js
- Category
- JavaScript
- Title
- javascript add option element to select
- Category
- JavaScript
- Title
- javascript async fetch file html
- Category
- JavaScript
- Title
- check if string contains substring javascript
- Category
- JavaScript
- Title
- how to get the next item in map() js
- Category
- JavaScript
- Title
- how to make dynamic columns in jquery
- Category
- JavaScript
- Title
- how to create component in reactjs
- Category
- JavaScript
- Title
- file input disable open file picker javascript
- Category
- JavaScript
- Title
- eval in javascript
- Category
- JavaScript
- Title
- discord.js how to go back a file
- Category
- JavaScript
- Title
- how to pass custom regex in jquery validation
- Category
- JavaScript
- Title
- http requests in vue 3
- Category
- JavaScript
- Title
- how to use ternary operatiion in sequelize join statement
- Category
- JavaScript
- Title
- get screen resolution jquery
- Category
- JavaScript
- Title
- generate thumbnail of pdf using pf js
- Category
- JavaScript
- Title
- generate random ip address javascript
- Category
- JavaScript
- Title
- ERROR in ./node_modules/tns-core-modules/ui/core/view/view.js Module not found: Error: Can't resolve '@nativescript/core/ui/core/view/view' in '/home/deepali/projects/supersquad-client/node_modules/tns-core-modules/ui/core/view'
- Category
- JavaScript
- Title
- check if checkbox is checked jquery
- Category
- JavaScript
- Title
- character to ascii in js
- Category
- JavaScript
- Title
- how to pass a value to a react funtion without immediately firing it
- Category
- JavaScript
- Title
- how to draw flower petals around circle javascript
- Category
- JavaScript
- Title
- in javascript check is is an array or not
- Category
- JavaScript
- Title
- add new items in a select input using js
- Category
- JavaScript
- Title
- array of in javascript
- Category
- JavaScript
- Title
- geolocation speed
- Category
- JavaScript
- Title
- angular observable subscribe and unsubscribe
- Category
- JavaScript
- Title
- access index of array javascript
- Category
- JavaScript
- Title
- javascript change webpage title
- Category
- JavaScript
- Title
- can't modify range value js
- Category
- JavaScript
- Title
- injected stylesheet remove
- Category
- JavaScript
- Title
- bootstrap 4 form validator with jquery
- Category
- JavaScript
- Title
- endpoint js
- Category
- JavaScript
- Title
- allow cross origin node
- Category
- JavaScript
- Title
- chrome add a bookmark that appends to current url
- Category
- JavaScript
- Title
- expo create react native app
- Category
- JavaScript
- Title
- how to get today date in javascript
- Category
- JavaScript
- Title
- add element to body javascript
- Category
- JavaScript
- Title
- convert an image into Base64 string using JavaScript
- Category
- JavaScript
- Title
- javascript append element to array
- Category
- JavaScript
- Title
- javascript canvas gamma correction
- Category
- JavaScript
- Title
- javascript addeventlistener
- Category
- JavaScript
- Title
- get selected text of html dropdown in javascript
- Category
- JavaScript
- Title
- find and delete element from array js
- Category
- JavaScript
- Title
- javascript array concat spread operator
- Category
- JavaScript
- Title
- javascript access property values list of objects
- Category
- JavaScript
- Title
- how to use the javascript console
- Category
- JavaScript
- Title
- async await react stackoverflow
- Category
- JavaScript
- Title
- go to another page using javascript
- Category
- JavaScript
- Title
- how to detect a keypress in javascript
- Category
- JavaScript
- Title
- how to read an array in javascript in HTML5
- Category
- JavaScript
- Title
- alert user javascript
- Category
- JavaScript
- Title
- async axios call
- Category
- JavaScript
- Title
- button not clicking for random jokes in javascript
- Category
- JavaScript
- Title
- ajax with progress bar
- Category
- JavaScript
- Title
- 1 - - 1 in javascript
- Category
- JavaScript
- Title
- how to create 3d gallery using javascript
- Category
- JavaScript
- Title
- javascript basic math
- Category
- JavaScript
- Title
- array every javascript
- Category
- JavaScript
- Title
- javascript carousel
- Category
- JavaScript
- Title
- base64 decode javascript
- Category
- JavaScript
- Title
- javascript change url hash
- Category
- JavaScript
- Title
- axios post data vue js
- Category
- JavaScript
- Title
- how to get unique values from array in javascript without duplicate value
- Category
- JavaScript
- Title
- javascript class inheritance
- Category
- JavaScript
- Title
- collision detection three js
- Category
- JavaScript
- Title
- enter event in jquery
- Category
- JavaScript
- Title
- iterate over array javascript
- Category
- JavaScript
- Title
- gsap
- Category
- JavaScript
- Title
- crypto.com api
- Category
- JavaScript
- Title
- create array of objects javascript
- Category
- JavaScript
- Title
- datatable after. draw
- Category
- JavaScript
- Title
- angular email validation
- Category
- JavaScript
- Title
- javascript clearinterval
- Category
- JavaScript
- Title
- get url react
- Category
- JavaScript
- Title
- how to make javascript function consise
- Category
- JavaScript
- Title
- how to hide javascript element by class
- Category
- JavaScript
- Title
- discord.js start code
- Category
- JavaScript
- Title
- How to make a function run only after 2 events has triggered js
- Category
- JavaScript
- Title
- dynamic forms in react
- Category
- JavaScript
- Title
- device height react native
- Category
- JavaScript
- Title
- bubble sort
- Category
- JavaScript
- Title
- Angular material design
- Category
- JavaScript
- Title
- javascript Compare two arrays regardless of order
- Category
- JavaScript
- Title
- how to build a string javascript es6
- Category
- JavaScript
- Title
- how to add object to array javascript
- Category
- JavaScript
- Title
- how to write a program that alerts the first 3 letters of the current day in javascript
- Category
- JavaScript
- Title
- angularjs iframe src binding
- Category
- JavaScript
- Title
- how to change tag name in js html
- Category
- JavaScript
- Title
- age calculator javascript
- Category
- JavaScript
- Title
- create array from htmlcollection
- Category
- JavaScript
- Title
- createnodefield
- Category
- JavaScript
- Title
- import react dom
- Category
- JavaScript
- Title
- inheritance in javascript
- Category
- JavaScript
- Title
- form validation react
- Category
- JavaScript