Level 73
Same question already asked and answered: https://stackoverflow.com/questions/277544/how-do-i-set-the-focus-to-the-first-input-element-in-an-html-form-independent-fr
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello ;
I have one div Element with id="nav-group" which contains another child element input type='text'
<div aria-labelledby="nav-group-tab" class="tab-pane fade show active" id="nav-group" role="tabpanel">
I'm wondering how to set focus to that child Input not by Id but by position (First) ?
Thanks
Please or to participate in this conversation.