Ir a la navegación
Ir a la búsqueda
Busca en cnbGuatemala con Google
93 bytes eliminados
, hace 7 años
Línea 94: |
Línea 94: |
| $('#searchInput').val('Comunicación'); | | $('#searchInput').val('Comunicación'); |
| var pressEvent = document.createEvent('KeyboardEvent'); | | var pressEvent = document.createEvent('KeyboardEvent'); |
− | pressEvent.initKeyEvent("keypress", true, true, window, false, false, false, false, 0, 40);
| + | |
| var input = document.getElementById('searchInput'); // Get the element where you want to press. | | var input = document.getElementById('searchInput'); // Get the element where you want to press. |
| input.dispatchEvent(pressEvent); // Press the key. | | input.dispatchEvent(pressEvent); // Press the key. |