HTML DOM tabIndex ÊôÐÔ

¶¨ÒåºÍÓ÷¨

tabIndex ÊôÐÔÉèÖûò·µ»ØÃÜÂëÓòµÄ tab ¼ü¿ØÖÆ´ÎÐò¡£

Óï·¨

passwordObject.tabIndex=number

ʵÀý

ÏÂÃæµÄÀý×Ó¿ÉÏÔʾ±íµ¥ÔªËØµÄ tab ¼ü¿ØÖÆ´ÎÐò£º

<html>
<head>
<script type="text/javascript">
function showTabIndex()
  {
  var email=document.getElementById('email').tabIndex;
  var pwd=document.getElementById('pwd').tabIndex;
  document.write("Tab index of email field: " + email);
  document.write("<br />");
  document.write("Tab index of password field: " + pwd);
  }
</script>
</head>
<body>

<form>
Email: <input type="text" id="email" tabindex="1" />
<br />
Password: <input type="password" id="pwd" tabindex="2" />
<br />
<input type="button" onclick="showTabIndex()" value="Show tabIndex" />
</form>

</body>
</html>
VUE