Tsallaka zuwa abun ciki
Justice Tech School

Keyboard and Form Events

keydown, keyup and keypress track typing. change fires when a field value changes and submit when a form is sent.

Example
$('input').keyup(function (e) {
  console.log(e.key, $(this).val());
});
$('form').submit(function (e) {
  e.preventDefault();
});

Exercise

Stop the form sending.

e.()

Quiz Test

Which event fires when a form is sent?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.