GWT HTML 5输入类型电话

use*_*157 2 gwt html5

我有一个GWT应用程序,我的目标是在移动设备上运行.我想使用新的HTML5 input type="tel"接受手机输入并让移动设备提示输入正确的键盘(数字).

我正在尝试使用GWT TextBox,但无法看到让它以正确的输入类型呈现HTML的方法.

关于这个的任何想法?

提前致谢.

aki*_*aki 5

简单的方法

TextBox tel=new TextBox();
tel.getElement().setAttribute("type", "tel");

TextBox email=new TextBox();
email.getElement().setAttribute("type", "email");

TextBox url=new TextBox();
url.getElement().setAttribute("type", "url");
Run Code Online (Sandbox Code Playgroud)