希望只要在失去焦点的时候在调用focus()就可以持续的获取焦点
focus()
监听一下 input 元素的 blur 事件就好了:
<body> <input type="text"> </body> <script>