HTML elements are mostly set using the focus method of js. There is an example below, you can refer to it
<body <form action="" method="post" name="form1" > <input type="text" id="id" /> </form> </body> <script> function myfocus() { document.getElementById('id').focus(); } </script>
For more related articles on how to set the focus of HTML elements, please pay attention to the PHP Chinese website !