JSFiddle - React, Tailwind, and code Playground

HTML

<input type='button' value='test' onclick='showTabIndex()' />
<input type='text' id='elem' />

JavaScript

function showTabIndex(){
    alert(document.getElementById("elem").tabIndex);
    }