4

I was trying to find a cross browser solution using Javascript that would allow me to send a keypress or keydown event to an input or textarea without using jQuery.

My research shows that KeyboardEvent.initKeyEvent(), KeyboardEvent.initKeyboardEvent() are all deprecated which means that Firing a keyboard event in javascript, Simulate keypress without jquery, and simulate javascript key events are questions with obsolete answers.

Is there a cross browser way that isn't deprecated to send an Enter key event to a DOM element?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
DiverseAndRemote.com
  • 19,314
  • 10
  • 61
  • 70

0 Answers0