IOS上的Javascript延迟关闭数字键盘
我有两个输入字段(type=“tel”)。当第一个输入字段被填充时,焦点将设置在第二个输入字段上 问题是在IOS上,当您在第一次输入中输入一个数字时;数字键盘在焦点转到第二个输入字段之前关闭 代码如下所示:IOS上的Javascript延迟关闭数字键盘,javascript,android,jquery,ios,Javascript,Android,Jquery,Ios,我有两个输入字段(type=“tel”)。当第一个输入字段被填充时,焦点将设置在第二个输入字段上 问题是在IOS上,当您在第一次输入中输入一个数字时;数字键盘在焦点转到第二个输入字段之前关闭 代码如下所示: // the view <input id='firstInput' type='tel'/> <input id='secondInput' type='tel'/> //JS $('#firstInput').on('input', function() {
// the view
<input id='firstInput' type='tel'/>
<input id='secondInput' type='tel'/>
//JS
$('#firstInput').on('input', function() {
$('#secondInput').focus();
});
//视图
//JS
$('#firstInput')。在('input',function(){
$('#secondInput').focus();
});
实例:
这将在android上运行,但在IOS上运行
我认为延迟关闭数字键盘是解决方案。如何延迟关闭IOS上的键盘?任何其他建议都将不胜感激 以下是您的解决方案:
$('#firstInput').on('blur', function() {
$('#secondInput').focus();
});
以下是您的解决方案:
$('#firstInput').on('blur', function() {
$('#secondInput').focus();
});
使用模糊事件,而不是输入:),这没有帮助。。我想这只是时间问题..使用模糊事件而不是输入:)那没有帮助。。我想这只是时间问题。希望这个解决方案对你有帮助。\n希望这个解决方案对你有帮助\