簡體   English   中英

移動鍵盤上字母數字的 html 5 輸入類型

[英]html 5 input type for alphanumeric on mobile keyboard

我們已經看到,當在移動鍵盤上選擇輸入類型“文本”時,它會出現文本,當在移動鍵盤上選擇輸入類型“數字”時,它只會出現數字。 And when input type password fields are selected then it comes up with both alphabet and numbers. 當輸入字段不是密碼而是純文本時,有沒有辦法在鍵盤上同時顯示字母和數字?

像這樣

希望你能得到我的詢問。 謝謝。

有關移動設備上不同類型的鍵盤輸入,請參閱示例。

最接近您願望的鍵盤可能是“密碼”鍵盤:

<input type="password">

嘗試:

<input type="password" pattern="[0-9]*" inputmode="numeric"> 

在 html5.1 之前通過 css:

 input[type=number] {
    -webkit-text-security: disc;
}
*<form>
  <input type="number" pattern="[0-9]*" inputmode="numeric">
  <button type="submit">Submit</button>
</form>*

這也應該可以將類型作為數字

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM