GlobalEventHandlers.onkeyup
A propriedade onkeyup retorna o código de manipulador de eventos onKeyUp no elemento atual.
Sintaxe
element.onkeyup = código do manipulador do eventos
Exemplo
<input type="text" onKeyUp="teclaPressionada(event)">
<script>
function teclaPressionada(evt) {
console.log(evt.keyCode)
}
</script>
Notas
O evento keyup é iniciado quando o usuário libera a tecla é pressionada.
Especificações
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'onkeyup' in that specification. |
Padrão em tempo real |
Compatibilidade
BCD tables only load in the browser