Tag:focus

  • How to set the focus of HTML elements

    Time:2019-11-6

    Copy code The code is as follows: <body <form action=”” method=”post” name=”form1″ > <input type=”text” /> </form> </body> <script> function myfocus() { document.getElementById(‘id’).focus(); } </script>

  • Solve the problem that focus events cannot be triggered under iOS

    Time:2019-9-12

    premise My idea is to let one input element lose focus after clicking on the event, and then another input element get focus. The code is as follows: $(‘#xd_content .tabcontent .nav’).on(‘click’, function () { $(‘#xd_content ‘).blur(); setTimeout(function () { $(‘#search .shop-search-ipt’).focus(); }, 400); }); It was found that Android had a stable keyboard, but IOS […]