源代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>编程字典</title> </head> <body> <a href="http://www.CodingDict.com/html" accesskey="h">HTML 教程</a><br> <a href="http://www.CodingDict.com/css" accesskey="c">CSS 教程</a> <p>accesskey 属性指定一个快捷键去激活一个元素或者使一个元素获得焦点 </p> <p><strong>注意:</strong> 快捷键每个浏览器都不相同:</p> <ul> <li>IE, Chrome, Safari, Opera 15+: [ALT] + <em>accesskey</em></li> <li>Opera prior version 15: [SHIFT] [ESC] + <em>accesskey</em></li> <li>Firefox: [ALT] [SHIFT] + <em>accesskey</em></li> </ul> </body> </html>
运行结果