Backspace
Enter any value in the input shown below and then press the Backspace
key. The key will operate as normal - remove the last character from the input.
Backspace
Enter any value in the input shown below and then press the Backspace
key. The key's default action, that is to delete the last character from the input, is prevented by the method preventDefault()
, and instead an alert is shown.