--- title: GlobalEventHandlers.onkeyup slug: Web/API/GlobalEventHandlers/onkeyup translation_of: Web/API/GlobalEventHandlers/onkeyup ---
La propiedad onkeyup devuelve un manejador para el evento onKeyUp del elemento actual.
element.onkeyup = event handling code
<input type="text" onKeyUp="keyWasPressed(event)"> <script>function keyWasPressed(evt){ console.log(evt.keyCode) }</script>
El evento keyup se lanza cuando el usuario suelta la tecla que ha sido presionada.
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG','webappapis.html#handler-onkeyup','onkeyup')}} | {{Spec2('HTML WHATWG')}} |
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}} |