案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function setAccessKeys()
5
  {
6
  document.getElementById('fname').accessKey="n"
7
  document.getElementById('pwd').accessKey="p"
8
  }
9
</script>
10
</head>
11
<body onload="setAccessKeys()">
12
13
<form>
14
Name: <input id="fname" type="text" />
15
<br />
16
Password: <input id="pwd" type="password" />
17
</form>
18
19
</body>
20
</html>
21