Wydarzenie JavaScript Fire Keypress
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));
Friendly Hawk
window.dispatchEvent(new KeyboardEvent('keypress', {
'key': 'a'
}));
setTimeout(function() { $("#txtName").keypress() } , 1000);
// OR
$(function() {
$('item').keydown();
$('item').keypress();
$('item').keyup();
$('item').blur();
});
$(function() {
var e = $.Event('keypress');
e.which = 65; // Character 'A'
$('item').trigger(e);
});