向超链接添加快捷键
- <html>
- <head>
- <script type="text/javascript">
- function accesskey()
- {
- document.getElementById('dom').accessKey="w"
- document.getElementById('dom1').accessKey="d"
- }
- </script>
- </head>
- <body onload="accesskey()">
- <p><a id="dom" href="http://www.yousite.com/">yousite.com</a> (请使用 Alt + w 给该链接赋予焦点)</p>
- <p><a id="dom1" href="http://www.yousite.com/htmldom/">HTML DOM</a> (请使用 Alt + d 为该链接赋予焦点)</p>
- </body>
- </html>