当表单字段通过JS聚焦时,Android软键盘不显示
因此,我使用jQuery插件RSV(RealSimpleValidation),因为客户端希望使用警报框而不是内联警报进行表单验证。 这个网站是针对移动浏览器的。 我遇到的问题是,当出现错误时,会出现一个警告对话框,告诉用户他们的冒犯行为。当警报关闭时,违规字段将被聚焦。 安卓的问题是软键盘没有显示出来。 以下是生成错误处理的代码:当表单字段通过JS聚焦时,Android软键盘不显示,android,Android,因此,我使用jQuery插件RSV(RealSimpleValidation),因为客户端希望使用警报框而不是内联警报进行表单验证。 这个网站是针对移动浏览器的。 我遇到的问题是,当出现错误时,会出现一个警告对话框,告诉用户他们的冒犯行为。当警报关闭时,违规字段将被聚焦。 安卓的问题是软键盘没有显示出来。 以下是生成错误处理的代码: function timsErrorFunction(f, errorInfo) { for (var i=0; i<errorI
function timsErrorFunction(f, errorInfo)
{
for (var i=0; i<errorInfo.length; i++)
{
// errorInfo[i][1] contains the error string to display for this failed field, e.g.
alert(errorInfo[i][1]);
// errorInfo[i][0] contains the form field node that just failed the validation, e.g.
errorInfo[i][0].focus();
errorInfo[i][0].style.color = "red";
}
return false; // always return false! Otherwise the form will be submitted
}
函数timsErrorFunction(f,errorInfo)
{
对于(var i=0;i我不熟悉Android的Web应用程序,也看不到这个问题的上下文(RSV声明、规则、oncomplete处理程序)
但是,我认为您没有正确使用RSV。
我的意思是,当验证失败时,您不应该手动使字段集中,这项工作将由RSV自动完成
您应该只返回一个数组而不是“false”。(有关更多详细信息,请参阅此链接:
)伙计,我需要你帮助RSV。请尽快与我联系:我的skype:tural.teyyuboglu;gmailturalsemail@gmail.com