English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
accesskey 全局属性 提供了为当前元素生成快捷键的方式。属性值必须包含一个可打印字符。
Verwendung von Accesskey:
!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Grundlagen-Tutorial-Website(oldtoolbag.com)</title> </head> <body> <form> <input type="text" name="name" value="enter your name:" size="25" maxlength="30" accesskey="n"> <u>n</u>ame<br><br> <input type="password" name="passwd" size="25" maxlength="30" accesskey="p"> <u>p</u>password<br><br> <input type="text" name="address" size="25" maxlength="30" accesskey="a"> <u>a</u>address<br><br> <input type="radio" name="sex" value="male" accesskey="m" checked><u>m</u>male<br> <input type="radio" name="sex" value="female" accesskey="f"> <u>f</u>female<br> </form> </body> </html>Testen Sie es heraus ‹/›
IEFirefoxOperaChromeSafari
Alle gängigen Browser unterstützen das accesskey-Attribut
Das Attribut accesskey legt die Tastenkombination fest, die das Element aktiviert (d.h. das Element erhält den Fokus).
Beachtung: Die Verwendung von Accesskeys variiert zwischen verschiedenen Browsern in verschiedenen Betriebssystemen:
Browser | Windows | Linux | Mac |
---|---|---|---|
Internet Explorer | [Alt] + Accesskey | N/A | |
Chrome | [Alt] + Accesskey | [Alt] + Accesskey | [Strg] [Alt] + Accesskey |
Firefox | [Alt] [Umschalt] + Accesskey | [Alt] [Umschalt] + Accesskey | [Strg] [Alt] + Accesskey |
Safari | [Alt] + Accesskey | N/A | [Strg] [Alt] + Accesskey |
Opera | Opera 15 oder neuer: [Alt] + Accesskey Opera 12.1 oder älter: [Umschalt] [Esc] + Accesskey |
Allerdings kann die Tastenkombination in den meisten Browsern auf eine andere Gruppe eingestellt werden.
Hinweis: Verwendung der Accesskey-Tastenkombinationen in verschiedenen Browsern:
IE Browser
Hold down the Alt key, click the shortcut key defined by accesskey (the focus will move to the link), then press Enter.
Firefox Browser
Hold down Alt+Shift key, click the shortcut key defined by accesskey.
Chrome Browser
Hold down the Alt key and click the shortcut key defined by accesskey.
Opera Browser
Hold down the Shift key and click esc, a list of accesskey shortcuts defined on this page will be displayed for selection.
Safari Browser
Hold down the Alt key and click the shortcut key defined by accesskey.
In HTML5 In HTML, the accesskey attribute can be used for any HTML element (it will Validate any HTML element. It is not necessarily useful).
In HTML 4.01 In HTML, the accesskey attribute can be used for: <a>, <area>, <button>, <input>, <label>, <legend>, and <textarea>.
<element accesskey="character">
Value | Description |
---|---|
character | Shortcuts for activating specified elements |