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,438
  • 68
  • 55
  • 126
DiverseAndRemote.com
  • 18,396
  • 8
  • 60
  • 70

0 Answers0