0
条件が満たされた後、次のタブインデックスに自動的に移動しようとしています。どのように私は次の要素のidタグを使用せずに、tabindexにアクセスすることができますか?入力条件の後の次のタブインデックスへのタブ
HTML:
<tr>
<td id = "t3"> <input type="text" id = "ate" oninput="ate()" tabindex= "1" class = "tabable"/> </td>
<td id = "t3"> <input type="text" id = "eaten" oninput ="eaten()" tabindex= "2" class = "tabable" /> </td>
</tr>
JS
function ate(){
var value = document.getElementById("ate").value;
var get_tab = document.getElementById("ate").getAttribute('tabindex');
var next_tab = get_tab + 1 ;
if (value == "ate") {
$('#ate').fadeTo(1000, 0);
$('#ate').prop('tabIndex', -1);
//document.getAttribute('tabindex'); ??
}
@Ben:SOへようこそ。お力になれて、嬉しいです! – Pugazh