--- title: GlobalEventHandlers.onkeyup slug: Web/API/GlobalEventHandlers/onkeyup translation_of: Web/API/GlobalEventHandlers/onkeyup ---
{{ApiRef("HTML DOM")}}

La propiedad onkeyup devuelve un manejador para el evento onKeyUp del elemento actual.

Sintaxis

element.onkeyup = event handling code

Ejemplo

 <input type="text" onKeyUp="keyWasPressed(event)">
 <script>function keyWasPressed(evt){ console.log(evt.keyCode) }</script>

Notas

El evento keyup se lanza cuando el usuario suelta la tecla que ha sido presionada.

Especificaciones

Specification Status Comment
{{SpecName('HTML WHATWG','webappapis.html#handler-onkeyup','onkeyup')}} {{Spec2('HTML WHATWG')}}  

Compatibilidad con navegadores

{{CompatibilityTable}}
Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}
Feature Android Android Webview Edge Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support {{CompatUnknown}} {{CompatVersionUnknown}} {{CompatVersionUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}}