我有一个移动网站,其中包含一些 HTML input 元素,如下所示:
I have a mobile website and it has some HTML input elements in it, like this:
<input type="text" name="txtAccessoryCost" size="6" />
我已将该网站嵌入到 WebView 用于可能的 Android 2.1 消费,因此它也将是一个 Android 应用程序.
I have embedded the site into a WebView for possible Android 2.1 consumption, so that it will also be an Android application.
当这个 HTML input 元素被聚焦时,是否可以获得带有数字的键盘而不是带有字母的默认键盘?
Is it possible to get the keyboard with numbers instead of the default one with letters when this HTML input element is focused?
或者,是否可以为整个应用程序设置它(可能在 Manifest 文件),如果它对于 HTML 元素不可行?
Or, is it possible to set it for the whole application (maybe something in the Manifest file), if it is not feasible for an HTML element?
<input type="number" />
<input type="tel" />
当输入获得焦点时,这两个都会显示数字小键盘.
Both of these present the numeric keypad when the input gains focus.
<input type="搜索"/>显示带有额外搜索按钮的普通键盘
<input type="search" />
shows a normal keyboard with an extra search button
其他一切似乎都调出了标准键盘.
Everything else seems to bring up the standard keyboard.
这篇关于如何在 Android 的移动网站中强制使用带有数字的键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
Android 上的数字软键盘Numeric Soft Keyboard on Android(Android 上的数字软键盘)
iPhone/iOS:为邮政编码呈现 HTML 5 键盘iPhone / iOS : Presenting HTML 5 Keyboard for Postal Codes(iPhone/iOS:为邮政编码呈现 HTML 5 键盘)
带有软键盘和“返回"的 EditText按钮EditText with soft keyboard and quot;Backquot; button(带有软键盘和“返回的 EditText按钮)
在 Android 上的应用程序中内置自定义“键盘&quoCustom #39;Keyboard#39; built in an application on Android(在 Android 上的应用程序中内置自定义“键盘)
如何使用 phonegap 在 iOS 应用程序中防止键盘上推How to prevent keyboard push up webview at iOS app using phonegap(如何使用 phonegap 在 iOS 应用程序中防止键盘上推 webview)
启动 Activity 时自动弹出键盘Automatic popping up keyboard on start Activity(启动 Activity 时自动弹出键盘)