热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Iphone开发-如何显示数字键盘?-IphoneDevelopment-Howtodisplayanumerickeyboard?

ImworkingonamobilewebsitewhichisNOTanativeiPhoneappbutratherasimplem.somedomain.co

I'm working on a mobile website which is NOT a native iPhone app but rather a simple m.somedomain.com website which is developed in c# asp.net .

我正在开发一个不是原生iPhone应用程序的移动网站,而是一个简单的m.somedomain.com网站,该网站是在c#asp.net中开发的。

Objective : On clicking one of the text boxes how do I display the numeric keyboard only ?

目标:单击其中一个文本框,如何仅显示数字键盘?

Note : The website is NOT in HTML5 and is not part of a webview inside a Native app but rather a standalone regular website

注意:该网站不是HTML5,不是Native应用程序内部的Webview的一部分,而是一个独立的常规网站

My textbox is a regular asp.net text box :

我的文本框是一个常规的asp.net文本框:


3 个解决方案

#1


13  

EDIT: I found here that you can use

编辑:我在这里找到你可以使用

to tell mobile safari to set the numeric keyboard as default, without needing to specify the telephone keyboard.

告诉移动safari将数字键盘设置为默认值,而无需指定电话键盘。

EDIT 2 (from comments below): You can also use Javascript to force numeric input as so:

编辑2(来自下面的评论):您还可以使用Javascript强制数字输入,如下所示:

57){return false;}”/>

#2


4  

If you use type="tel" instead of type="text" it will bring up a numeric keyboard.

如果你使用type =“tel”而不是type =“text”,它将调出一个数字键盘。

#3


0  

For Salesforce (not HTML input type='number'), below java-script should make the iPad, iPhone numeric keypad defaultly appear. (This solution should work for asp.net control as well)

对于Salesforce(不是HTML输入类型='数字'),下面的java脚本应该会使iPad,iPhone数字键盘默认出现。 (此解决方案也适用于asp.net控件)

    
    
     
    

    
          
      This is a numeric input  
      
    



推荐阅读
author-avatar
M-G思维_891
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有