我只是想隐藏在特定的屏幕上,我用document.activeElement.blur()测试;但它也没有关注()输入.
可以通过调用document.activeElement上的blur方法来实现一个简单的解决方案,它有效地允许用户以编程方式隐藏键盘:
// automatically close the keyboard on iOSdocument.activeElement.blur();
有关HTML5和移动应用程序事件的更多信息
http://www.ericfeminella.com/blog/2012/12/27/ios-html5-input-element-tips/