简体   繁体   English

如何在 Tizen web 应用程序中输入数字和符号

[英]How to input digits and symbols in Tizen web app

I'm trying to make input field, where I can enter IP address.我正在尝试制作输入字段,我可以在其中输入 IP 地址。 If I use type="number" it is not possible to pick .如果我使用type="number"则无法选择. symbol.象征。 But if I use type="text" there are some unnecessary keyboards are displayed, such as letters, voice input, emojis that I don't want to have.但是,如果我使用type="text" ,则会显示一些不必要的键盘,例如我不想拥有的字母、语音输入、表情符号。 I want to have something like two pages with digits and symbols.我想要两页带有数字和符号的东西。 Any suggestions?有什么建议么?

index.html index.html

<div class="ui-page" id="page-text-input">
    <div class="ui-content text-input-content">
        <input id="ip" name="ip" placeholder="IP" type="number" />
    </div>
</div>

I verified your issue.我验证了你的问题。 I think this is not issue of keyboard or platform.我认为这不是键盘或平台的问题。 Referring to https://developer.mozilla.org/pl/docs/Web/HTML/Element/Input#attributes the input field type="number" doesn't fit to IP address.参考https://developer.mozilla.org/pl/docs/Web/HTML/Element/Input#attributes输入字段 type="number" 不适合 IP 地址。 This type is dedicated for floating numbers.这种类型专用于浮点数。 Apart from the fact that there is one separator for decimals in the number, it can be a point or a comma depending on the location / region settings.除了数字中有一个小数分隔符之外,它可以是一个点或一个逗号,具体取决于位置/区域设置。

Only solution what I see that you add four input fields with type number for each IP number class or use some widget like spin widget.唯一的解决方案是我看到您为每个 IP 数字 class 添加四个类型编号的输入字段或使用一些小部件,如旋转小部件。

Best regards, Tomasz最好的问候,托马斯

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM