使用JavaScript在iPhone中禁用“转到"按钮 [英] Disable Go button in iPhone with JavaScript

查看:46
本文介绍了使用JavaScript在iPhone中禁用“转到"按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为iPhone创建小型表单,并在该表单上进行JavaScript验证(当然,这是通过服务器验证来备份的,但这不是重点).

I'm creating small form for iPhone and on that form I do JavaScript validation (backed up by server validation of course but that is not the point).

作为此验证的结果,我动态地启用/禁用了提交按钮.这项功能非常出色,除了屏幕键盘上的开始"按钮不能反映我唯一拥有的并始终启用的提交按钮的状态.

As a result of this validation I enable/disable submit button dynamically. This work great except that "Go" button in on screen keyboard does not reflect the status of the only submit button I have and is always enabled.

有什么办法可以解决此问题?我可以用JavaScript禁用Go按钮吗?

Is there any way this can be fixed? Can I somehow disable that Go button with JavaScript?

推荐答案

屏幕键盘"无法通过JavaScript进行编辑.如果表单未通过验证,您应该取消提交事件.

The On Screen Keyboard can not be edited by JavaScript. You should just cancel submit events if the form didn't validate.

这篇关于使用JavaScript在iPhone中禁用“转到"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆