屏蔽输入在android手机中不起作用? [英] masked input not working in android mobiles?

查看:31
本文介绍了屏蔽输入在android手机中不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 digitalbush 屏蔽输入 jQuery 插件.它在网络浏览器和 iPhone 浏览器中运行良好,但不适用于 Android 移动设备.

I am using the digitalbush masked input jQuery plugin. It is working fine in web browsers and the iPhone browser perfectly, but it is not working for Android mobile devices.

我的问题:面具是在输入字段 _ - _ - ___.

My issue : mask is in input field _ - _ - ___.

当我输入数字时,它将 12345685555___--

When I type numbers it will 12345685555___--

示例:http://rossbender.com/temp/mask.html

有什么建议吗?我该如何解决这个问题?

Any suggestions? How can I solve this?

谢谢普拉萨德.

推荐答案

我通过三个操作解决了这个问题,所有 Android 4.0+ 手机都解决了这个问题:

I resolved this issue with three actions, which have fixed this for all Android 4.0+ phones:

  1. 将屏蔽输入更新到至少版本 1.4
  2. 在输入中添加 type="tel",以触发数字键盘
  3. 删除输入的 maxlength 属性或将其设置为确定不会干扰插入符号操作的值,例如 20.
  1. Update masked-input to at least version 1.4
  2. Add type="tel" to the input, to trigger the numeric keyboard
  3. Remove the input's maxlength attribute or set it to a value certain not to interfere with the caret action, like 20.

这篇关于屏蔽输入在android手机中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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