Hide mobile safari keyboard when form submitted in Ajax application

后端 未结 1 738
不思量自难忘°
不思量自难忘° 2021-02-07 13:17

I have a textfield which fires an event in a web app, but I\'d like the keyboard to close when the user presses enter. Using jquery to disable usual submission.

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 13:40

    Create blur event

    To open:

    $('input#search').focus();
    

    To close:

    $('input#search').blur();
    

    0 讨论(0)
提交回复
热议问题