tabIndex 예제
<p><a id="hz1" href="https://homzzang.com">Link 1</a></p> <p><a id="hz2" href="https://homzzang.com">Link 2</a></p> <p><a id="hz3" href="https://homzzang.com">Link 3</a></p> <input type="button" onclick="homzzang()" value="TabIndex 변경"> <script> function homzzang() { document.getElementById("hz1").tabIndex = "3"; document.getElementById("hz2").tabIndex = "2"; document.getElementById("hz3").tabIndex = "1"; } </script> 결과보기
<p><a id="hz1" href="https://homzzang.com">Link 1</a></p>
<p><a id="hz2" href="https://homzzang.com">Link 2</a></p>
<p><a id="hz3" href="https://homzzang.com">Link 3</a></p>
<input type="button" onclick="homzzang()" value="TabIndex 변경">
<script>
function homzzang() {
document.getElementById("hz1").tabIndex = "3";
document.getElementById("hz2").tabIndex = "2";
document.getElementById("hz3").tabIndex = "1";
}
</script>
결과보기
※ 버튼 누르기 전과 버튼 누른 후의 Tab 키 탐색 순서 비교.