Skip to content
Advertisement

How to let a div or span tag to receive a keydown event in Javascript

For example,

JavaScript

Here is a jsfiddle example

Advertisement

Answer

You can specify the tabindex on it.

For example,

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement