Categories
tech

Intercept the Enter key

Let’s see the right way to use the process the keypress() of jQuery to intercept the urgent of the input key (Enter) at the a part of the person.

The code to accomplish the verification is the next:

Continues after the commercial…
$("#shape").keypress(serve as(e)  if (and.which == 13)  /* ACTION TO PERFORM */

);

The force of the important thing with identification 13 is, in truth, the button Enter at the keyboard.

Browse content material