jquery - Simulate and fire enter keypress in JavaScript -
i trying run number of automated (simple) js tests on website , simulate , trigger enter key press on input field (its not in form , not use form, not wish edit code). i've been trying stuff along lines of:
$('#inputfield').trigger($.event('keypress', { which: 13, keycode: 13 }));
i've gone through countless answers on internet, none have helped , wondering if suggest why should trivial matter.
- using chrome v. 49
- can use jquery
thanks.
Comments
Post a Comment