案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function showTabIndex()
5
  {
6
  var email=document.getElementById('email').tabIndex;
7
  var r1=document.getElementById('submit1').tabIndex;
8
  document.write("Tab index of email: " + email);
9
  document.write("<br />");
10
  document.write("Tab index of submit button: " + r1);
11
  }
12
</script>
13
</head>
14
<body>
15
16
<form>
17
Email: <input type="text" id="email" tabindex="1" size="25" value="someone@example.com" />
18
<br />
19
<input type="submit" id="submit1" tabindex="2" />
20
<br /><br />
21
<input type="button" onclick="showTabIndex()" value="Show tabIndex" />
22
</form>
23
24
</body>
25
</html>
26