案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function showTabIndex()
5
{
6
var sun=document.getElementById('sun').tabIndex;
7
var mercury=document.getElementById('mercury').tabIndex;
8
var venus=document.getElementById('venus').tabIndex;
9
10
document.write("Tab index of Sun: " + sun);
11
document.write("<br />");
12
document.write("Tab index of Mercury: " + mercury);
13
document.write("<br />");
14
document.write("Tab index of Venus: " + venus);
15
}
16
</script>
17
</head>
18
<body>
19
20
<img src ="/img/eg_planets.jpg"
21
alt="Planets"
22
usemap ="#planetmap" />
23
24
<map name="planetmap">
25
<area shape ="rect" coords ="0,0,110,260"
26
href ="/example/hdom/sun.html" id="sun" tabIndex="1" />
27
<area shape ="circle" coords ="129,161,10"
28
href ="/example/hdom/mercur.html" id="mercury" tabIndex="2" />
29
<area shape ="circle" coords ="0,0,110,260"
30
href ="/example/hdom/venus.html" id="venus" tabIndex="3" />
31
</map>
32
33
<input type="button" onclick="showTabIndex()" value="显示 tabIndex" />
34
35
</body>
36
</html>
37