“JS Keycodes” Code-Antworten

JQuery Event KeyCode

$('#someTextBox').keypress(function(event){
    var keycode = (event.keyCode ? event.keyCode : event.which);
    if(keycode == '13'){
        alert('You pressed a "enter" key in textbox');  
    }
});
Inquisitive Ibis

JS Keycodes

//A great tool is https://keycode.info/
//This tool allows you to press buttons on your keyboard, and give you
//tons of infomation on the different codes, and more! :)
Determined Programmer

Schlüsselcodes JavaScript

/* If you want to know javascript key codes while using
document.addEventListener("keyup"/"keydown", (e) => {}), then, you can go to
keycode.info and press any key to gets e.key, e.location, e.keyCode(e.location)
and e.code
*/
Vivacious Vulture

So finden Sie KeyCode in JavaScript

event.keyCode;
zizi-engi

Ähnliche Antworten wie “JS Keycodes”

Fragen ähnlich wie “JS Keycodes”

Weitere verwandte Antworten zu “JS Keycodes” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen