W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function showTabIndex() { var sun=document.getElementById('sun').tabIndex; var mercury=document.getElementById('mercury').tabIndex; var venus=document.getElementById('venus').tabIndex; document.write("Tab index of Sun: " + sun); document.write("<br />"); document.write("Tab index of Mercury: " + mercury); document.write("<br />"); document.write("Tab index of Venus: " + venus); } </script> </head> <body> <img src ="/i/eg_planets.jpg" alt="Planets" usemap ="#planetmap" /> <map name="planetmap"> <area shape ="rect" coords ="0,0,110,260" href ="/example/hdom/sun.html" id="sun" tabIndex="1" /> <area shape ="circle" coords ="129,161,10" href ="/example/hdom/mercur.html" id="mercury" tabIndex="2" /> <area shape ="circle" coords ="180,139,14" href ="/example/hdom/venus.html" id="venus" tabIndex="3" /> </map> <input type="button" onclick="showTabIndex()" value="显示 tabIndex" /> </body> </html>