HTML specifies the attribute accesskey of the shortcut key that activates (makes the element focus)

黄舟
Release: 2017-11-03 09:34:45
Original
2716 people have browsed it

Example

Hyperlink with specified shortcut key:

<a href="http://www.w3school.com.cn/html/" accesskey="h">HTML</a><br />
<a href="http://www.w3school.com.cn/css/" accesskey="c">CSS</a>
Copy after login

Browser support

Almost all browsers have accesskey Properties , except Opera.

Definition and Usage

The accesskey attribute specifies the shortcut key for activating (making the element gain focus) the element.

Tips and Notes

Note: The following elements support the accesskey attribute: , ,